Date   

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.


Using Storyboard References as objects

Rick Aurbach
 

I would like to build an object similar to a IB "Container View", but which stores a list of contained views and can transition from one to another. Ideally, the view would contain an outlet collection which would store its associated sub-controllers. And it would be really nice if I could connect EITHER a scene from the current storyboard OR a storyboard reference.

To do that, I think I need to know what a storyboard reference really is and how to access it. (So far, if there is any information about this on the web I haven't been able to find it.)

Does anyone have any clues or pointers that I can use without causing my app to be rejected by the AppStore? (And yes, I know I can just try it and see what I get, but I thought I'd ask you folks before I did that.)

Rick


Re: Bugreporter ?

Gerriet M. Denkmann
 

On 28 Sep 2017, at 15:49, Quincey Morris <quinceymorris@...> wrote:

It’s working for me. I would try logging out, and go in via the link at the bottom of the main developer.apple.com page (which has an extra step).
I just tried again - and it is working for me too. Probably just a temporary problem. Sorry for the noise.

Gerriet.


On Sep 27, 2017, at 23:51 , Gerriet M. Denkmann <g@...> wrote:

Is the Bugreporter not working?


Re: Bugreporter ?

Quincey Morris
 

It’s working for me. I would try logging out, and go in via the link at the bottom of the main developer.apple.com page (which has an extra step).

On Sep 27, 2017, at 23:51 , Gerriet M. Denkmann <g@...> wrote:

Is the Bugreporter not working?


Bugreporter ?

Gerriet M. Denkmann
 

Logging in to: https://bugreport.apple.com I get a page “Bug Reporter” which does *not* lists my bugs, but just contains one line: “Apple Developer Program Support.”, which is a link to: https://developer.apple.com/contact/submit.php.

Is the Bugreporter not working? Or is this the new normal way of operation?

Gerriet.


Re: a mouse event problem on macOS

James Walker
 

On 9/20/2017 5:17 PM, Graham Cox wrote:

      
On 21 Sep 2017, at 3:53 am, James Walker <list2@...> wrote:

Thank you very much.  Your code didn't work for me at first, perhaps because of a complication that I did not mention in my original message:  The original mouse down happens in a Carbon window.  Anyway, the mouse events returned by -[NSWindow nextEventMatchingMask:untilDate:inMode:dequeue:] are for the wrong window and hence have the wrong mouse coordinates, so I had to convert the coordinates and create a new NSEvent for the right window before forwarding it on to my view's mouseDragged: method.  But it's working now.
OK, sounds a bit smelly, but whatever works, I guess.

The red flag here is the need to “create an event”. I don’t believe there’s ever any reason to do that in mainstream (i.e. app level) code.

NSView has a reference to its window, and the events for that window should have the -locationInWindow coordinate correct for the window. From that you need to convert to the view’s local coordinates using -convertPoint:fromView:, but other than that there’s nothing special to do. I’m not sure why Carbon windows make a difference (surprised they’re still a thing), and since you are creating the overlay window, then everything should be local to that. The original mouse down in the Carbon window is irrelevant in this case - you can simply discard it.

NSView’s trio of mouse methods - mouseDown: -mouseDragged: and -mouseUp: are conveniences - NSView internally implements a loop just like the one I showed which calls out to those methods, but you are not obliged to use them.

The docs on -[NSWindow nextEventMatchingMask:untilDate:inMode:dequeue:] says it forwards the message to -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:].  So, how does NSApplication know what window to send the event to?  It could check what's under the location of the mouse, but as Quincey Morris said elsewhere in this thread, maybe it just sends mouse dragged and mouse up events to the same target as the mouse down.

1141 - 1160 of 1475