Omar Reis

Member since: Tuesday, 19 May 2015
Last login: 3 weeks ago
Profile viewed: 317 views

Your Rank: 89
Points: 5

Omar Reis thanked Sarina D in topic Cannot hide virtual keyboard 1 month ago
Omar Reis created a new topic ' MacOS Mojave, XCode 9.4 and iOS' in the forum. 1 month ago

I have a problem with iOS on MacOS Mojave: I can't make Delphi provisioning to work
I googled this and nobody else seems to have this problem, so I must be doing something silly
I know only a few people are using Mojave, so it might be the source of the problem. I don't know...

This is what I tried:

- On an iMac with MacOS Mojave and Xcode 9.4.1
- Started PAServer 19.0. Failed to acquire debug rights ( no password dialog shown ).
This happens in Mojave. Continued with PAServer session anyway
- Connected an iPhone6 with iOS 11.4.1
- On Xcode, build and run a Hello World project. App run on the phone, so provisioning must be ok
( Using Xcode Wild card app provisioning )
- Run Delphi 10.2.3. Load a Hello World project
Build config=Debug
Target = iOS device 64 iPhoneOS 11.4
- Project > Options > Version info. CFBundle identifier=$(ModuleName)
- Project > Options > Provisioning
- Delphi reports Error: No provisioning Profile found for selected build configuration and selected device “iphone6”

with PAServer in verbose mode, I can see the commands Delphi is running

Delphi: "/usr/bin/security" find-identity -v

Running this on a separate Terminal i got:
1) 5F...B942 "iPhone Developer: Omar reis (MY_DEV_ID)” <— valid developer certificate

Delphi runs:

"/usr/bin/security" find-certificate -p -a -c "iPhone Developer: Omar reis (MY_DEV_ID)”
this returns the encoded certificate:
BEGIN CERTIFICATE
MII...
…BM=
END CERTIFICATE——

Delphi runs:
"/usr/bin/security" cms -D -i "/Users/<username>/Library/MobileDevice/Provisioning Profiles/247-…-5g2d.mobileprovision”
This is a CMS decode command

Returns the provisioning profile, in xml format. More or less like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>AppIDName</key>
	<string>Xcode iOS Wildcard App ID</string>
	<key>ApplicationIdentifierPrefix</key>
	<array>
	<string>MY_TEAM_ID</string>       <— Developer group ID
	</array>
	<key>CreationDate</key>
	<date>2018-11-05T13:23:41Z</date>
	<key>Platform</key>
	<array>
		<string>iOS</string>
	</array>
    <key>IsXcodeManaged</key>                <- provisioning managed by Xcode
	<true/>
	<key>DeveloperCertificates</key>
	<array>
		<data>MIIF….BD=</data>       <- Certificate for "iPhone Developer: Omar reis (MY_DEV_ID)”
	</array>
	<key>Entitlements</key>
	<dict>
		<key>keychain-access-groups</key>
		<array>
			<string>MY_TEAM_ID.*</string>	<- Wildcard app ID	
		</array>
		<key>get-task-allow</key>
		<true/>
		<key>application-identifier</key>
		<string>MY_TEAM_ID.*</string>
		<key>com.apple.developer.team-identifier</key>
		<string>MY_TEAM_ID</string>

	</dict>
	<key>ExpirationDate</key>
	<date>2019-11-05T13:23:41Z</date>
	<key>Name</key>
	<string>iOS Team Provisioning Profile: *</string>
	<key>ProvisionedDevices</key>
	<array>
		<string>48a0..</string>
                ...
		<string>a3a7...</string>      <— device “iphone6” id
                ...
		<string>3ff...</string>
		
	</array>
	<key>TeamIdentifier</key>
	<array>
		<string>MY_TEAM_ID</string>
	</array>
	<key>TeamName</key>
	<string>OMAR REIS</string>
	<key>TimeToLive</key>
	<integer>365</integer>
	<key>UUID</key>
	<string>247...2d</string>
	<key>Version</key>
	<integer>1</integer>
</dict>
From this it looks development provisioning is OK:

1- There is a valid developer certificate
2- The Wildcard app id is specified that matched CFBundleIdentifier
3- The connected device is listed as Provisioned Device
But Delphi reports the error mentioned above (No provisioning found etc etc)

I tried to add the iOS Distribution certificate to the developer iMac:

Now "/usr/bin/sefind-identity -v returns 2 certificates

1) 3423..DB4 "iPhone Distribution: OMAR REIS (MY_TEAM_ID)”
2) 5F9F..B942 "iPhone Developer: Omar reis (MY_DEV_ID)"
2 valid identities found

following this, Delphi goes:
"/usr/bin/security" find-certificate -p -a -c "iPhone Distribution: OMAR REIS (MY_TEAM_ID)"
From what I understand from debug provisioning, it connects 3 things:

1- an App ID ( in my case MY_TEAM_ID.*)
2- a developer certificate like "iPhone Developer: Omar reis (MY_DEV_ID)”
3- a device id like my "iphone6"

So Delphi should ask for a developer certificate, not the distribution. Puzzled

Anyway, provisioning continues to fail..

What am I doing wrong ??

Omar Reis

Read More...

Omar Reis replied to the topic 'MacOS Mojave and iOS Provisioning' in the forum. 1 month ago

Anyone using MacOS Mojave to develop with Delphi 10.2.3 ?

Read More...

Omar Reis created a new topic ' Android sensor permissions with API level 26' in the forum. 1 month ago

I'm trying to fix sample project OrientationSensor
to work with Android API level 26.

I installed Android SDK 26.0 and
edited AndroidManifest.template.xml do android:targetSdkVersion="26"

The app starts, but no sensor reading is received

Any idea how to fix it ?

I suppose it may be one of those permission problems.
Which permission is necessary for orientation sensors ?

Read More...

Omar Reis replied to the topic 'iOS Provisioning' in the forum. 1 month ago

further investigation, as suggested
connected an iPhone 6 with iOS 11.4
Xcode 9.4.1 Window>Devices detects the phone
Right click the phone to “Show Provisioning Profiles”
That lists 3 profiles, including mine

Loaded a “Hello world” project on Xcode
Build and run Hello World on the phone. Ok


Started Delphi 10.2.3.
Build configuration=Debug
Target=iOS Device 64 - iOS SDK 11.4
Right click “iphone6” Refresh - phone is detected by Delphi
selected Project > Options > Provisioning

Using PAServer in verbose mode, I can see that
Delphi runs 1 command on PAServer to detect provisioning failure

"/usr/bin/security" find-identity -v

Running this command on a separate Terminal i got:

1) 79...B99A "Developer ID Application: OMARR (V7..29)"
2) 0AC...9E3 "Developer ID Installer: OMARR (V7..29)"
3) 342...DB4 "iPhone Distribution: OMARR (V7..29)”
4) 21...8D4C "iPhone Developer: OmarR (W92..BB)"

From this Delphi said “No provisioning profile found”
May be the problem has to do with the certificate names.
I used Xcode automatic certificate creation

I tryed to find some option of Provisioning on Delphi
but it seems there is only the <Auto> mode.

Read More...

Omar Reis created a new topic ' iOS Provisioning' in the forum. 1 month ago

I'm trying to release a new version of my app to the AppStore.

I found there is a new minimum requirement of iOS SDK 11.3.
In order to meet that, I had to update XCode from 8.3.3 to 9.4.1.
And in order to do that, I had to update MacOS from Sierra to Mojave.

On the Delphi side, I updated to a clean install of Delphi 10.2.3
I imported the iOS SDK 11.4, but that caused a Linker error 1.

To fix that I installed a Delphi patch as suggested by Marco Cantu
Also patched the PAServer 19.0 on the Mac.

see blog.marcocantu.com/blog/2018-june-delph...deinsight-patch.html

That fixed the Linker problem, but now the PAServer fails
to acquire debug permissions on Mojave ( The admin dialog will not show )
So I started the PAServer as admin using

cd /Applications/PAServer-19.0.app/Contents/MacOS/
sudo ./paserver

Now Delphi is unable to import the provisioning profile.

On Project > Options > Provisioning there is an error:
No provisioning profile found for the selected
build configuration and the selecte device "iphoneX"

On the iMac, certificates and provisioning seems to be ok.
XCode is able to install and run its apps.
But Delphi is not.

I've been wrestling with this for a week now.
Any ideas ?

Omar

Read More...

Omar Reis created a new topic ' iOS provisioning profile' in the forum. 1 month ago

I'm trying to build a new version of my app for the AppStore,
to meet Apple's new minimum requirement of iOS SDK 11.3.

That forced me to update XCode from 8.3.3 to 9.4.1.
And that required a MacOS update.
I had MacOS Sierra and updated to Mojave.

I re-installed Delphi 10.2.3 and patched it as suggested on Marco Cantu blog
( to fix a linker error 1 with iOS SDK 11.4 ).
I also patched PAServer 19.0 (same blog post)
see blog.marcocantu.com/blog/2018-june-delph...deinsight-patch.html

I found PAServer 19 to be unable to acquire permission on Mojave,
so I'm starting it with

cd /Applications/PAServer-19.0.app/Contents/MacOS/
sudo ./paserver
This seems to work, however..

Now I can't make Delphi's to import iOS Provisioning.

Project > Options > Provisioning for "iOS Device Debug Configuration" shows:

Profile: <Use environment options (Auto)>

error: No provisioning profile found for the selected build configuration
and the selected device "iphoneX"

I tryed to revoke and recreate all certificates and made XCode
download the updated provisioning profiles.
Provisioning on the Mac is Ok. Xcode is able to build and deploy its apps, but
for some reason Delphi can't find the provisioning profiles.

Going crazy over this. Been wrestling with this all week. :(

Any ideas ?

thanks
Omar

Read More...

Omar Reis replied to the topic 'XE8 Platform Assistant Update 1' in the forum. 4 years ago

I assumed "PA 16 update 1" was to be used with XE8 iOS simulator hot fix.
Thank you for clarifying it

Omar
Read More...

Omar Reis created a new topic ' XE8 Platform Assistant Update 1' in the forum. 4 years ago

I tried to download the XE8 PA upd 1 from

docwiki.embarcadero.com/RADStudio/XE8/en...m_Assistant_on_a_Mac

got "file not found". Where is it ?

Omar
Read More...

Omar Reis created a new topic ' XE8 Platform Assistant Update 1' in the forum. 4 years ago

I tried to download the XE8 PA upd 1 from

docwiki.embarcadero.com/RADStudio/XE8/en...m_Assistant_on_a_Mac

got "file not found". Where is it ?

Omar
Read More...