Date   

Re: [XCode] Developer ID code signing - still exists?

Roland King
 

I have the Developer ID option on that screen, it's just below the Website Push ID one for me.

Perhaps go check the agreements section and see if there's one which has been updated you need to click on.

Otherwise a call to Apple is in your future.


On 12/10/2017 07:51, Graham Cox wrote:
Hi all,

Run into another code signing issue.

I distribute an app outside the App Store, so I use a Developer ID to sign it. Suddenly, the option to do this disappeared from XCode. When I attempt it, I get the following error:


(If the screenshot wasn’t allowed, it has

Failed to locate or generate matching signing assets:
Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues
Permissions failure
Your account does not have permission to create MacOS App Direct Distribution certificates.)

So, I go to apple developer site to see what’s going on. Under my Mac OS signing certificates, I have a development ID, and certs forthe App Store. But no Developer ID cert. When I go to add one, there is no option available:


(I really hope we can attach screenshots, because decribing this one is tedious. But the gist is: there’s no option to request a Developer ID certificate, only a development cert, or Mac App Store (plus push notifications, et, which are irrelvant to me).

We have checked and we’re fully paid up, so we see no reason that Developer ID certificates shoukd be unavailable to us.

Are they still supported? If not, what am I supposed to do to sign my app?

—Graham





Re: [XCode] Developer ID code signing - still exists?

Alex Zavatone
 

On Oct 12, 2017, at 10:16 AM, Alex Zavatone <zav@...> wrote:


On Oct 11, 2017, at 8:51 PM, Graham Cox <graham@...> wrote:


Yep, I since discovered the same thing. The account owner (not me) was able to create Developer ID certs, but there’s still a problem - because she requested the cert (using Keychain Access), when I download the cert, there’s no associated private key, so signing still fails, but now with a slightly different error message.
The same person who requests the key is the one that needs to download and install it. You need to be an admin on the dev site, or whomever is needs to request it, download and install it and then export the p12 file and send it to you.

There is a very good commercial book on this that has a chapter that explains this in depth.
Here’s the book, Graham. I strongly recommend that you get it and read chapter 2. Lots of what you want to do for Mac OS is the same as it is for iOS.

https://www.safaribooksonline.com/library/view/essential-ios-build/9781449314781/ch01.html

http://shop.oreilly.com/product/0636920022282.do

GL.

- Alex Zavatone


Re: [XCode] Developer ID code signing - still exists?

Alex Zavatone
 

On Oct 11, 2017, at 8:51 PM, Graham Cox <graham@...> wrote:


Yep, I since discovered the same thing. The account owner (not me) was able to create Developer ID certs, but there’s still a problem - because she requested the cert (using Keychain Access), when I download the cert, there’s no associated private key, so signing still fails, but now with a slightly different error message.
The same person who requests the key is the one that needs to download and install it. You need to be an admin on the dev site, or whomever is needs to request it, download and install it and then export the p12 file and send it to you.

There is a very good commercial book on this that has a chapter that explains this in depth.

We don’t know how to resolve this. I’ve asked Apple support, seems they may have broken something, or else we just don’t understand how it’s supposed to work (quite likely). Waiting on their response.

—Graham


Re: [XCode] Developer ID code signing - still exists?

Quincey Morris
 

That is by design, because the ability to download the private key is a pretty big security hole. The account owner can go to her login keychain and export the certificate and keys as a .p12 file which you can import into your keychain.

Alternatively, she can export her developer profile from Xcode itself and you can import it. However, I avoid this because it’s not clear whether this will transfer other information which you don’t want overriding your current Xcode setup, or shouldn’t have.

On Oct 11, 2017, at 18:51 , Graham Cox <graham@...> wrote:

I download the cert, there’s no associated private key, so signing still fails, but now with a slightly different error message.


Re: [XCode] Developer ID code signing - still exists?

Graham Cox
 

Yep, I since discovered the same thing. The account owner (not me) was able to create Developer ID certs, but there’s still a problem - because she requested the cert (using Keychain Access), when I download the cert, there’s no associated private key, so signing still fails, but now with a slightly different error message.

We don’t know how to resolve this. I’ve asked Apple support, seems they may have broken something, or else we just don’t understand how it’s supposed to work (quite likely). Waiting on their response.

—Graham

On 12 Oct 2017, at 11:46 am, Quincey Morris <quinceymorris@...> wrote:

It’s missing for me on my “regular” Apple ID team role. However, when I logged in as the account owner (team agent), the extra Developer ID option was shown. I’m pretty sure this is (relatively) new — I think I used to do this as just admin role.

On Oct 11, 2017, at 16:51 , Graham Cox <graham@...> wrote:

Suddenly, the option to do this disappeared from XCode.


Re: [XCode] Developer ID code signing - still exists?

Quincey Morris
 

It’s missing for me on my “regular” Apple ID team role. However, when I logged in as the account owner (team agent), the extra Developer ID option was shown. I’m pretty sure this is (relatively) new — I think I used to do this as just admin role.

On Oct 11, 2017, at 16:51 , Graham Cox <graham@...> wrote:

Suddenly, the option to do this disappeared from XCode.


[XCode] Developer ID code signing - still exists?

Graham Cox
 

Hi all,

Run into another code signing issue.

I distribute an app outside the App Store, so I use a Developer ID to sign it. Suddenly, the option to do this disappeared from XCode. When I attempt it, I get the following error:


(If the screenshot wasn’t allowed, it has

Failed to locate or generate matching signing assets:
Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues
Permissions failure
Your account does not have permission to create MacOS App Direct Distribution certificates.)

So, I go to apple developer site to see what’s going on. Under my Mac OS signing certificates, I have a development ID, and certs forthe App Store. But no Developer ID cert. When I go to add one, there is no option available:


(I really hope we can attach screenshots, because decribing this one is tedious. But the gist is: there’s no option to request a Developer ID certificate, only a development cert, or Mac App Store (plus push notifications, et, which are irrelvant to me).

We have checked and we’re fully paid up, so we see no reason that Developer ID certificates shoukd be unavailable to us.

Are they still supported? If not, what am I supposed to do to sign my app?

—Graham




Schemes in WKWebView

Gerriet M. Denkmann
 

iOS 11.

I created MySchemeHandler, which implements the WKURLSchemeHandler protocol; methods just do NSLog().

NSString *myScheme = @"myScheme";

[wkWebView.configuration setURLSchemeHandler: mySchemeHandler forURLScheme: myScheme];

NSURLComponents *uc = [ [ NSURLComponents alloc ] init ];
uc.scheme = myScheme;
uc.path = @“/abcXYZ";
NSURLRequest *ur = [ NSURLRequest requestWithURL: uc.URL ];
WKNavigation *wn = [ wkWebView loadRequest: ur ];

but nothing happens; MySchemeHandler gets never called.

What am I missing?

Gerriet.


Re: WKWebView does not load images

Gerriet M. Denkmann
 

I change an iOS app from UIWebView to WKWebView.

1. The Simulator (iPhone SE) complains:
could not create directory “/Volumes/เม่น/Users/gerriet/Library/Developer/CoreSimulator/Devices/77[…]CC/data/Containers/Data/Application/8A2[…]5E/Library/Caches/de.mdenkmann.gThai/WebKit/OfflineWebApplicationCache” for future sandbox extension, error Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “OfflineWebApplicationCache” in the folder “WebKit”."

There certainly is no such thing as: “/Volumes/เม่น/“, but it seems to be working nevertheless.

Both in Simulator and device (iPhone SE) :

2. everything is extremely small: 18 pt. text looks like 6 pt. Probably could be fixed by modifying the css-stuff, multiplying everything by 3.

3. but, same as in macOS, there are no images - just a box with the alt-text.

Gerriet.


Re: WKWebView does not load images

Steve Christensen
 

A couple of things I notice:

1. You seem to be trying several variants on the base or full file URLs without success. Are you generating the paths via NSURL so that they are formatted correctly?

baseURL = [NSURL fileURLWithPath:@"/absolut/path/to/PicturesFolder" isDirectory:YES];

This URL could be passed to -loadHTMLString:baseURL: or you could use baseURL.absoluteString when generating the <base href…>.

2. If your PicturesFolder is contained within a directory in one of the known domains, are you using NSSearchPathForDirectoriesInDomains() to generate that portion of the base URL path and then appending subdirectory components using -stringByAppendingPathComponent: repeatedly to build the full path? If you are making an assumption about where those folders are created then that could be biting you if you made the wrong assumption.

3. The <img> src of "./image67.gif" looks weird to me. I would expect that "image67.gif" would work since the base URL already provides the partial URL to the directory containing that image.


On Oct 7, 2017, at 12:34 AM, Gerriet M. Denkmann <g@...> wrote:

On 7 Oct 2017, at 03:52, Steve Christensen <punster@...> wrote:

Is /path/to/myImage.gif a full path or a partial path? I ask because you didn’t specify a base URL.

htmlString actually looks like:

<base href=“file:/absolut/path/to/PicturesFolder/“ />

<img alt=“alternate”  src=“./image67.gif" />


I also tried (following the suggestion from Jens):
<img alt=“alternate”  src=“file:///absolut/path/to/PicturesFolder/image67.gif” />
Still no picture.


Do the path components have the correct case if the image is on a case-sensitive volume?
Yes, they have. And yes, the volume is case-sensitive.


Also, both:
[ self.webView loadHTMLString: htmlString  baseURL: nil ];
and
[ self.webView loadHTMLString: htmlString  baseURL:  urlTo “/“  ];
give the same result.


On Oct 6, 2017, at 7:58 AM, Gerriet M. Denkmann <g@...> wrote:

[ wkWebView loadHTMLString: htmlString  baseURL: nil ];

htmlString contains: …<img alt=“alternate”  src=“/path/to/myImage.gif” /> ….

WKWebView just shows a rectangle containing: “alternate”.

WebView shows the picture.

Are there any special steps needed to make WKWebView show images?

Gerriet.


Re: WKWebView does not load images

Gerriet M. Denkmann
 

On 7 Oct 2017, at 03:52, Steve Christensen <punster@...> wrote:

Is /path/to/myImage.gif a full path or a partial path? I ask because you didn’t specify a base URL.
htmlString actually looks like:

<base href=“file:/absolut/path/to/PicturesFolder/“ />

<img alt=“alternate” src=“./image67.gif" />


I also tried (following the suggestion from Jens):
<img alt=“alternate” src=“file:///absolut/path/to/PicturesFolder/image67.gif” />
Still no picture.


Do the path components have the correct case if the image is on a case-sensitive volume?
Yes, they have. And yes, the volume is case-sensitive.


Also, both:
[ self.webView loadHTMLString: htmlString baseURL: nil ];
and
[ self.webView loadHTMLString: htmlString baseURL: urlTo “/“ ];
give the same result.




On Oct 6, 2017, at 7:58 AM, Gerriet M. Denkmann <g@...> wrote:

[ wkWebView loadHTMLString: htmlString baseURL: nil ];

htmlString contains: …<img alt=“alternate” src=“/path/to/myImage.gif” /> ….

WKWebView just shows a rectangle containing: “alternate”.

WebView shows the picture.

Are there any special steps needed to make WKWebView show images?

Gerriet.


Re: WKWebView does not load images

 



On Oct 6, 2017, at 1:52 PM, Steve Christensen <punster@...> wrote:

Is /path/to/myImage.gif a full path or a partial path? I ask because you didn't specify a base URL.

Another thing that just occurred to me — since there is no base URL, there’s nothing to resolve the path relative to. (Yes it’s an absolute path, but that’s still a relative URL.) Try using “file:///path/to/my/image.gif”.

—Jens


Re: WKWebView does not load images

Steve Christensen
 

Is /path/to/myImage.gif a full path or a partial path? I ask because you didn't specify a base URL.

Do the path components have the correct case if the image is on a case-sensitive volume?

On Oct 6, 2017, at 7:58 AM, Gerriet M. Denkmann <g@...> wrote:

[ wkWebView loadHTMLString: htmlString baseURL: nil ];

htmlString contains: …<img alt=“alternate” src=“/path/to/myImage.gif” /> ….

WKWebView just shows a rectangle containing: “alternate”.

WebView shows the picture.

Are there any special steps needed to make WKWebView show images?

Gerriet.


Re: WKWebView does not load images

Gerriet M. Denkmann
 

On 6 Oct 2017, at 23:29, Jens Alfke <jens@...> wrote:

On Oct 6, 2017, at 7:58 AM, Gerriet M. Denkmann <g@...> wrote:

htmlString contains: …<img alt=“alternate” src=“/path/to/myImage.gif” /> ….

WKWebView just shows a rectangle containing: “alternate”.
WKWebView has more security, so it probably disallows filesystem access. Or at least you may need to configure something about the “origin” or “security domain” to enable it. Or setting the baseURL to a “file:” URL might help.
The only way I can make WKWebView work properly is:

htmlString = …
write htmlString to tempUrl
[ wkWebView loadFileURL: tempUrl allowingReadAccessToURL: common root of tempUrl and imagesUrl ]

I do not like this at all. So I’ll better stick with WebView until WKWebView gets smarter.

Gerriet.


Re: WKWebView does not load images

 



On Oct 6, 2017, at 7:58 AM, Gerriet M. Denkmann <g@...> wrote:

htmlString contains: …<img alt=“alternate”  src=“/path/to/myImage.gif” /> ….

WKWebView just shows a rectangle containing: “alternate”.

WKWebView has more security, so it probably disallows filesystem access. Or at least you may need to configure something about the “origin” or “security domain” to enable it. Or setting the baseURL to a “file:” URL might help.

Basically, it’s a security hole to let HTML loaded from the web access the local filesystem. WebView assumes HTML you give it from a string is local/trusted, but it looks like WKWebView doesn’t.

—Jens


WKWebView does not load images

Gerriet M. Denkmann
 

[ wkWebView loadHTMLString: htmlString baseURL: nil ];

htmlString contains: …<img alt=“alternate” src=“/path/to/myImage.gif” /> ….

WKWebView just shows a rectangle containing: “alternate”.

WebView shows the picture.

Are there any special steps needed to make WKWebView show images?

Gerriet.


Re: WKWebView

Gerriet M. Denkmann
 

On 5 Oct 2017, at 18:38, Alex Zavatone <zav@...> wrote:

WKPrivateNavigationDelegate webView:decidePolicyForNavigationAction?

On Oct 5, 2017, at 6:32 AM, Gerriet M. Denkmann <g@...> wrote:

The documentation says:
“In apps that run in macOS 10 and later, use the WKWebView class instead of using WebView.”
“In apps that run in iOS 8 and later, use the WKWebView class instead of using UIWebView.”

WebView has:
webView:decidePolicyForNavigationAction:decisionHandler:

and UIWebView has:
webView:shouldStartLoadWithRequest:navigationType:

what would the equivalent in WKWebView be?

WKNavigationDelegate has:
webView:decidePolicyForNavigationAction:decisionHandler:
Correction:
this is only called once (after loadHTMLString:baseURL:) with navigationType = WKNavigationTypeOther;
and also when clicking on a link with scheme ≠ file with navigationType = WKNavigationTypeLinkActivated.

By the way, this is still macOS 12 (because the installer for macOS 13 does not work).

Gerriet.


Re: WKWebView

Gerriet M. Denkmann
 

On 5 Oct 2017, at 18:38, Alex Zavatone <zav@...> wrote:

WKPrivateNavigationDelegate webView:decidePolicyForNavigationAction?
Called once; never called when I click on a link.


On Oct 5, 2017, at 6:32 AM, Gerriet M. Denkmann <g@...> wrote:

The documentation says:
“In apps that run in macOS 10 and later, use the WKWebView class instead of using WebView.”
“In apps that run in iOS 8 and later, use the WKWebView class instead of using UIWebView.”

WebView has:
webView:decidePolicyForNavigationAction:decisionHandler:

and UIWebView has:
webView:shouldStartLoadWithRequest:navigationType:

what would the equivalent in WKWebView be?

WKNavigationDelegate has:
webView:decidePolicyForNavigationAction:decisionHandler:

but this is only called once (after loadHTMLString:baseURL:) with navigationType = WKNavigationTypeOther;
never when I click on a link.

Gerriet.





Re: WKWebView

Alex Zavatone
 

WKPrivateNavigationDelegate webView:decidePolicyForNavigationAction?

On Oct 5, 2017, at 6:32 AM, Gerriet M. Denkmann <g@...> wrote:

The documentation says:
“In apps that run in macOS 10 and later, use the WKWebView class instead of using WebView.”
“In apps that run in iOS 8 and later, use the WKWebView class instead of using UIWebView.”

WebView has:
webView:decidePolicyForNavigationAction:decisionHandler:

and UIWebView has:
webView:shouldStartLoadWithRequest:navigationType:

what would the equivalent in WKWebView be?

WKNavigationDelegate has:
webView:decidePolicyForNavigationAction:decisionHandler:

but this is only called once (after loadHTMLString:baseURL:) with navigationType = WKNavigationTypeOther;
never when I click on a link.

Gerriet.




WKWebView

Gerriet M. Denkmann
 

The documentation says:
“In apps that run in macOS 10 and later, use the WKWebView class instead of using WebView.”
“In apps that run in iOS 8 and later, use the WKWebView class instead of using UIWebView.”

WebView has:
webView:decidePolicyForNavigationAction:decisionHandler:

and UIWebView has:
webView:shouldStartLoadWithRequest:navigationType:

what would the equivalent in WKWebView be?

WKNavigationDelegate has:
webView:decidePolicyForNavigationAction:decisionHandler:

but this is only called once (after loadHTMLString:baseURL:) with navigationType = WKNavigationTypeOther;
never when I click on a link.

Gerriet.

1121 - 1140 of 1460