Date   

Re: Puzzle with Hardened Runtime entitlement

Jack Brindle
 

Hardened Runtime is not currently a requirement for Notarization, but it appears that you have to submit the app using the command-line tool for notarization to happen properly. All my attempts at submitting using the Xcode archive method forces me to enable hardened runtime. I have not attempted at submission using Xcode 11, but when submitting with Xcode 10, I have had no problems with hardened runtime so far.

By the way, it appears that hardened runtime causes issues within Apple’s frameworks related to input monitoring. With it, we were not able to get the input monitoring prompt to appear. Removing it allowed our apps to operate properly. These apps do extensive work with BLE keyboard control.

So, you might want to use the command line method for submission to get around this, at least until the requirements change in January.

Jack


On Oct 31, 2019, at 6:25 PM, Graham Cox <graham@...> wrote:

I have an app I’d like to notarize for distribution outside the app store.

To do this, it requires the hardened runtime entitlement.

I have added that in the project settings.

When I try and submit the app for notarization, it says “hardened runtime not enabled”.

But it is:

<Screen Shot 2019-11-01 at 12.21.49 pm.png>


I have no idea what’s going on, or how to fix this. I’m using Xcode 11.0

One thing that does seem odd, there is no “<app>.entitlements” file in the project. Changing settings in the Xcode UI doesn’t add such a file. Is this the problem?


—Graham




Puzzle with Hardened Runtime entitlement

Graham Cox
 

I have an app I’d like to notarize for distribution outside the app store.

To do this, it requires the hardened runtime entitlement.

I have added that in the project settings.

When I try and submit the app for notarization, it says “hardened runtime not enabled”.

But it is:



I have no idea what’s going on, or how to fix this. I’m using Xcode 11.0

One thing that does seem odd, there is no “<app>.entitlements” file in the project. Changing settings in the Xcode UI doesn’t add such a file. Is this the problem?


—Graham



Re: Developer

Alex Zavatone
 

Then check the certificates and profiles in the signed package(s).  

I use a cery and profile inspector that someone wrote for Spotlight and is on Github.  




On Oct 17, 2019, at 11:42 PM, Carl Hoefs <newslists@...> wrote:

In our case, these apps are just for internal development purposes, such as student projects and the like. It's nice to be able to showcase them each semester, but the iPad apps always expire, and they have to be reinstalled onto the iPad from Xcode over and over again. All are using the same developer profile and certificate for all devices. Odd it would have an issue with just the iPad Pros? If I wipe/zero/reset the iPads clean and start over anew, might it clear this?

-Carl



On Oct 17, 2019, at 9:32 PM, Alex Zavatone via Groups.Io <zav@...> wrote:

There are some signing options where if you are part of a TestFlight team, your install will last for a certain time.  There are other install options where if you have an Enterprise cert installed (or something like that), the installation lasts longer.  I’d check which certs and mobileconfigs are installed on each device.  Also if one device is signed in to purchase the app from the App Store or to use TestFlight.

AZ


On Oct 17, 2019, at 6:26 PM, Carl Hoefs <newslists@...> wrote:

Did you find out anything more about this problem? We're experiencing it too. iPhone app builds expire after 1 year, but last only a week or two on the iPad. My boss just got bitten by this at a demo.

-Carl


On Oct 6, 2019, at 2:20 AM, Gerriet M. Denkmann <gerriet@...> wrote:

A friend of mine has a problem:

When he installs an app (via Xcode) on his iPhone it works fine (probably the app will expire after one year).
But when he installs the same app on his iPad, the app will expire after just one week.

What could be the reason for this behaviour?

Gerriet.














Re: Developer

Alexander von Below
 

Maybe this helps: Code to decode mobileprovisions https://github.com/below/cgjprofile

Von meinem iPhone gesendet

Am 19.10.2019 um 08:43 schrieb Gerriet M. Denkmann <gerriet@...>:



On 18 Oct 2019, at 06:26, Carl Hoefs <newslists@...> wrote:

Did you find out anything more about this problem? We're experiencing it too. iPhone app builds expire after 1 year, but last only a week or two on the iPad. My boss just got bitten by this at a demo.

-Carl


On Oct 6, 2019, at 2:20 AM, Gerriet M. Denkmann <gerriet@...> wrote:

A friend of mine has a problem:

When he installs an app (via Xcode) on his iPhone it works fine (probably the app will expire after one year).
But when he installs the same app on his iPad, the app will expire after just one week.

What could be the reason for this behaviour?

Find …/Your iOS.app/embedded.mobileprovision, open in some editor and delete the first 62 bytes, so that it starts with:
“<?xml version="1.0" encoding="UTF-8”?>”
Save as: /anyPath/anyName.plist and open this in Xcode.

Look at ProvisionedDevices and TimeToLive.

It seems that every Developer Team has a List of (up to 100) ProvisionedDevices, which will build with TimeToLive = 365.
Building for a device which is *not* in ProvisionedDevices will get TimeToLive = 7.

So the problem reduces to: How to add a device to the list of ProvisionedDevices.
And I do not know the answer.
My Xcode seems to add any new device to this list by some kind of magic.

The Xcode of your boss (and of my poor friend) seems not to do this.


Gerriet.





Re: Developer

Bernie Maier
 

On Sat, 19 Oct 2019, at 5:42 PM, Gerriet M. Denkmann wrote:


Find …/Your iOS.app/embedded.mobileprovision, open in some editor and
delete the first 62 bytes, so that it starts with:
“<?xml version="1.0" encoding="UTF-8”?>”
Save as: /anyPath/anyName.plist and open this in Xcode.
Alternatively, run this on the command line to strip the security message container and signing from the contained plist:

```
security cms -D -i path-to.mobileprovision
```

I did some research into this a while ago (by I which I mean I did some searching and found other people’s research into this). I collected this and other related info into a public BitBucket snippet:

https://bitbucket.org/snippets/blurkk/5LB5LM

Cheers,
Bernie


Re: Developer

Gerriet M. Denkmann
 

On 18 Oct 2019, at 06:26, Carl Hoefs <newslists@autonomy.caltech.edu> wrote:

Did you find out anything more about this problem? We're experiencing it too. iPhone app builds expire after 1 year, but last only a week or two on the iPad. My boss just got bitten by this at a demo.

-Carl


On Oct 6, 2019, at 2:20 AM, Gerriet M. Denkmann <gerriet@mdenkmann.de> wrote:

A friend of mine has a problem:

When he installs an app (via Xcode) on his iPhone it works fine (probably the app will expire after one year).
But when he installs the same app on his iPad, the app will expire after just one week.

What could be the reason for this behaviour?
Find …/Your iOS.app/embedded.mobileprovision, open in some editor and delete the first 62 bytes, so that it starts with:
“<?xml version="1.0" encoding="UTF-8”?>”
Save as: /anyPath/anyName.plist and open this in Xcode.

Look at ProvisionedDevices and TimeToLive.

It seems that every Developer Team has a List of (up to 100) ProvisionedDevices, which will build with TimeToLive = 365.
Building for a device which is *not* in ProvisionedDevices will get TimeToLive = 7.

So the problem reduces to: How to add a device to the list of ProvisionedDevices.
And I do not know the answer.
My Xcode seems to add any new device to this list by some kind of magic.

The Xcode of your boss (and of my poor friend) seems not to do this.


Gerriet.


Re: Developer

Carl Hoefs
 

In our case, these apps are just for internal development purposes, such as student projects and the like. It's nice to be able to showcase them each semester, but the iPad apps always expire, and they have to be reinstalled onto the iPad from Xcode over and over again. All are using the same developer profile and certificate for all devices. Odd it would have an issue with just the iPad Pros? If I wipe/zero/reset the iPads clean and start over anew, might it clear this?

-Carl



On Oct 17, 2019, at 9:32 PM, Alex Zavatone via Groups.Io <zav@...> wrote:

There are some signing options where if you are part of a TestFlight team, your install will last for a certain time.  There are other install options where if you have an Enterprise cert installed (or something like that), the installation lasts longer.  I’d check which certs and mobileconfigs are installed on each device.  Also if one device is signed in to purchase the app from the App Store or to use TestFlight.

AZ


On Oct 17, 2019, at 6:26 PM, Carl Hoefs <newslists@...> wrote:

Did you find out anything more about this problem? We're experiencing it too. iPhone app builds expire after 1 year, but last only a week or two on the iPad. My boss just got bitten by this at a demo.

-Carl


On Oct 6, 2019, at 2:20 AM, Gerriet M. Denkmann <gerriet@...> wrote:

A friend of mine has a problem:

When he installs an app (via Xcode) on his iPhone it works fine (probably the app will expire after one year).
But when he installs the same app on his iPad, the app will expire after just one week.

What could be the reason for this behaviour?

Gerriet.













Re: Developer

Alex Zavatone
 

There are some signing options where if you are part of a TestFlight team, your install will last for a certain time. There are other install options where if you have an Enterprise cert installed (or something like that), the installation lasts longer. I’d check which certs and mobileconfigs are installed on each device. Also if one device is signed in to purchase the app from the App Store or to use TestFlight.

AZ

On Oct 17, 2019, at 6:26 PM, Carl Hoefs <newslists@autonomy.caltech.edu> wrote:

Did you find out anything more about this problem? We're experiencing it too. iPhone app builds expire after 1 year, but last only a week or two on the iPad. My boss just got bitten by this at a demo.

-Carl


On Oct 6, 2019, at 2:20 AM, Gerriet M. Denkmann <gerriet@mdenkmann.de> wrote:

A friend of mine has a problem:

When he installs an app (via Xcode) on his iPhone it works fine (probably the app will expire after one year).
But when he installs the same app on his iPad, the app will expire after just one week.

What could be the reason for this behaviour?

Gerriet.







Re: Developer

Alex Zavatone
 

Seems like it’s a custom signed IPA.

On Oct 17, 2019, at 6:26 PM, Carl Hoefs <newslists@autonomy.caltech.edu> wrote:

Did you find out anything more about this problem? We're experiencing it too. iPhone app builds expire after 1 year, but last only a week or two on the iPad. My boss just got bitten by this at a demo.

-Carl


On Oct 6, 2019, at 2:20 AM, Gerriet M. Denkmann <gerriet@mdenkmann.de> wrote:

A friend of mine has a problem:

When he installs an app (via Xcode) on his iPhone it works fine (probably the app will expire after one year).
But when he installs the same app on his iPad, the app will expire after just one week.

What could be the reason for this behaviour?

Gerriet.







Re: Developer

Carl Hoefs
 

Did you find out anything more about this problem? We're experiencing it too. iPhone app builds expire after 1 year, but last only a week or two on the iPad. My boss just got bitten by this at a demo.

-Carl

On Oct 6, 2019, at 2:20 AM, Gerriet M. Denkmann <gerriet@mdenkmann.de> wrote:

A friend of mine has a problem:

When he installs an app (via Xcode) on his iPhone it works fine (probably the app will expire after one year).
But when he installs the same app on his iPad, the app will expire after just one week.

What could be the reason for this behaviour?

Gerriet.





Re: NSScrollView showing part of view with white space above

Graham Cox
 

One thing I find when working with scroll views is that making the contained view flipped is usually helpful. If you return YES from an override to -isFlipped, scroll views default to a position with the the scroller at the top, not the bottom. It generally makes layout and calculations in the view easier as you are working with a more conventional coordinate system. Flipping the view generally doesn’t make anything else more difficult -in fact, usually easier.

Also, just set the bounds to whatever size you need and NSScrollView will generally just figure out everything else. You don’t need to directly manipulate the scrollbars or calculate anything.

—Graham



On 14 Oct 2019, at 12:30 am, Aandi Inston via Cocoa-dev <cocoa-dev@...> wrote:

But, the vertical scroll bar position is at the BOTTOM of the window. 


UITableView selection changed at some point

Steve Mills
 

I have a UITableView that has x number of simple rows (name and image), then one row at the end that also has a name and image, but also uses a disclosure indicator accessory, which opens a new scene (I'll call it scene B) when tapped. In previous versions of iOS (currently I can only check 10.0), tapping that last row would select it, and then when returning from the scene B, it would still correctly be selected. Now in iOS 13, it no longer *appears* to be selected when I return from scene B. But, if I get the table view's indexPathForSelectedRow, it is indeed the correct row.

Is there something I need to do to fix this? I'll obviously report this bug, but I sure would like to find a hack to make it work correctly.

--
Steve Mills
Drummer, Mac geek


Developer

Gerriet M. Denkmann
 

A friend of mine has a problem:

When he installs an app (via Xcode) on his iPhone it works fine (probably the app will expire after one year).
But when he installs the same app on his iPad, the app will expire after just one week.

What could be the reason for this behaviour?

Gerriet.


Re: CMSensorRecorder.accelerometerDataSince(_:) missing?

Fritz Anderson
 

I found one reference for iOS 10:


but on inspection it’s clear it’s derived from a class dump, not the documented interface. Hence accursed for distribution.

Off to Feedback Assistant to ask that the API be exposed.

— F

On 25 Sep 2019, at 7:50 PM, Quincey Morris <quinceymorris@...> wrote:

On Sep 25, 2019, at 14:49 , Fritz Anderson <anderson.fritz@...> wrote:

Xcode 11 won’t complete the symbol; it raises an error when I try to use it anyway; and the derived interface for the class doesn’t include it.

It’s not in the Obj-C header file either. (iOS 13.0 SDK in Xcode 11) This just looks like an error in the documentation.

Perhaps this method existed for a while in the beta period for 13.0. I checked in the iOS 13.1 SDK (Xcode 11.1 beta), but it’s also not there.


Re: CMSensorRecorder.accelerometerDataSince(_:) missing?

Quincey Morris
 

On Sep 25, 2019, at 14:49 , Fritz Anderson <anderson.fritz@...> wrote:

Xcode 11 won’t complete the symbol; it raises an error when I try to use it anyway; and the derived interface for the class doesn’t include it.

It’s not in the Obj-C header file either. (iOS 13.0 SDK in Xcode 11) This just looks like an error in the documentation.

Perhaps this method existed for a while in the beta period for 13.0. I checked in the iOS 13.1 SDK (Xcode 11.1 beta), but it’s also not there.


Re: How to have users select a directory

Graham Cox
 



I’d stick with the button, because its clickability shouldn’t be in doubt.

The text field, if it’s just a label, is not generally assumed to be clickable, and if you show it as editable, that sends the message that you’re expected to type something. NSPathControl is also a good choice for displaying the path, since it deals with excessive length more intelligently than a text field, and also shows icons (optionally), which can be helpful. NSPathControl can be made an active control, but I don’t think it works very well for choosing a directory.

Also, consider the case of when no folder has been set. When an app is sandboxed, this is very often the case when your app first launches, since until you pick something you don’t have the necessary security privileges to display a path. After choosing a location, you would create a security-scoped bookmark to persist that choice, but on first run you can’t so that. So your text field will be initially blank, and only the button offers any clue that you’re expected to do something. You can of course back that up with a sheet alert that prompts you to pick a folder when that UI first appears and there’s no folder set. You should also set the placeholder text (of the text label or NSPathControl) to instruct the user to choose a folder - it will be displayed automatically when that path is empty.

Here’s all I do in one of my apps - this is a button and an NSPathControl used passively.



—Graham





On 26 Sep 2019, at 1:49 am, Gabriel Zachmann via Cocoa-dev <cocoa-dev@...> wrote:

I am looking for a nice, intuitive way to let users select a directory.

Right now, I have a simple TextField in my GUI that shows the current path,
and a simple Button next to it that says "Change".
When users click on it, it opens an NSOpenPanel that is runModal.

This works fine, but I am wondering if there are more elegant methods.
For instance, whether it might be possible to dispense with the button,
make it obvious that users can click on the text field, and then open the NSOpenPanel.

Or are there any other neat ideas?

(I was stumbling across NSPathControl, but it is not clear to me whether that would be a good alternative,
and how difficult it might be.)

Thanks a lot in advance for all kinds of insights and hints.

Best regards, Gabriel


CMSensorRecorder.accelerometerDataSince(_:) missing?

Fritz Anderson
 

Xcode 11, targeted at 13 or 12.x (no difference to this issue).

I need to accumulate accelerometer data from Core Motion over long periods of time (I’m aware of the 12-hour / 3-day limits). The class reference includes

func accelerometerDataSince(_ identifier: UInt64) -> CMSensorDataList?

which would be ideal, because you can keep the batch ID for the last records you retrieved, pass it to this func, and get only and exactly the subsequent records. No calculations or races.

Xcode 11 won’t complete the symbol; it raises an error when I try to use it anyway; and the derived interface for the class doesn’t include it.

On top of this, the Class Reference lists the function.

On top of THAT, the headword for the function is “accelerometerDataSince:” — ObjC idiom.

---


The alternative, accelerometerData(from:to:), looks error-prone. You could pass distant-past (or first-run) to “from”, and then the latest-reported timestamp from the previous fetch (plus a millisecond, the two limits are _inclusive_).

But the docs say there is a lag of up to 3 minutes between recording a record and its availability through the API: (… to: Date()) won’t get you all the data already captured. If I pass only the last-_reported_ date (plus a millisecond) to the from: in the next call, that should be fine. I’d expect the request for records in the 3-minute gap not to taint the “from” in the next request.

But I’m not paid to be optimistic.

---

Am I confined to this accelerometerData(from:to:) dance, or am I missing something? The compiler and the generated interface seem to be pretty definitive.

— F


Re: Devmate: what are people using when it disappears?

Leo
 

I was in a similar situation last year - albeit not with DevMate: had to find an alternative to eSellerate.

After a lengthy research and comparison of whatever licensing platforms I could find, I switched to SoftwareKey.com.

To me they offered the best pricing model with all features I needed.

Their customer support is also excellent.

Since, unlike me, you're using FastSpring for e-commerce, your transition should be even easier as SoftwareKey already has some kind of established integration with FastSpring.

One detail: I had a major requirement to any licensing platform: to provide a personal online license portal for the users. That is, a place where users can login at any time to manage their activations without having to contact me at all. This portal was also a major reason why I chose SoftwareKey.

If you don't have such a requirement, you may have a wider range of platforms to choose from.

In any case, switching to a different licensing platform is a major ordeal. If you have any questions let me know.


Leo

On 9/19/19 7:58 PM, Graham Cox wrote:
Is anyone out there using Devmate as a means of handling licensing in their Mac apps?

If so, you???ll know it???s deprecated as of December, and so far Fastspring, who bought out Devmate, appear not to have any real alternative.

So if this is you, what are you planning to do about it? I???d like to get some sort of discussion going so that the various alternatives are laid out and a clear forward path becomes more obvious. At the moment I???m totally unclear what to do. Fastspring say ???contact us??? if we are affected by this, but having done so, they never reply. Very poor.

???Graham




Devmate: what are people using when it disappears?

Graham Cox
 

Is anyone out there using Devmate as a means of handling licensing in their Mac apps?

If so, you’ll know it’s deprecated as of December, and so far Fastspring, who bought out Devmate, appear not to have any real alternative.

So if this is you, what are you planning to do about it? I’d like to get some sort of discussion going so that the various alternatives are laid out and a clear forward path becomes more obvious. At the moment I’m totally unclear what to do. Fastspring say “contact us” if we are affected by this, but having done so, they never reply. Very poor.

—Graham


Re: Swift definition of "_"

Dave
 

Thanks, found it now. The documentation is pretty good, a cross reference/index would be icing of the cake!

Cheers
Dave

On 17 Sep 2019, at 13:39, Bernie Maier <apple-dev@worklists.blurk.net> wrote:

On Tue, 17 Sep 2019, at 8:28 PM, Dave wrote:
Hi All,

In a definition like this:

func NSLocationInRange(_ loc: Int, _ range: NSRange) -> Bool

What does the “_” by itself mean? I can’t seem to find anywhere in the
documentation where this is mentioned? If its in there somewhere I’d
appreciate a pointer to it.
It means the corresponding function argument does not have a parameter label when **calling** the function. So you would call via something like:

NSLocationInRange(42, someRange)
This is documented in the Swift Language Guide (https://docs.swift.org/swift-book/LanguageGuide/Functions.html)

Omitting Argument Labels
If you don’t want an argument label for a parameter, write an underscore (_) instead of an explicit argument label for that parameter.

func someFunction(_ firstParameterName: Int, secondParameterName: Int) {
// In the function body, firstParameterName and secondParameterName
// refer to the argument values for the first and second parameters.
}
someFunction(1, secondParameterName: 2)
If a parameter has an argument label, the argument must be labeled when you call the function.
Cheers,
Bernie


401 - 420 of 1454