Universal Apps

RSS for tag

A single Universal app includes native binaries that run on Intel-based Macs and Apple Silicon Macs.

Posts under Universal Apps tag

86 results found
Sort by:
Post not yet marked as solved
40 Views

My app is damaged and can't be opened when porting to M1 ?

I have porting my existing application to support native M1, there a a lot of framework and library that I have already build for both platform. The strange result is when I archive the app on Intel machine. The binary work on Intel platform well. When I archive my application on M1 machine, the app can work on M1 well. But when I try to run app that build on M1 on Intel Machine, then I got the message said my app is damaged and can't be opened. The same situation got for build in Intel platform one. I try "lipo -archs" command on my app and I did get "x86_64 arm64" as result, so my app should already a universal app I guess. Does any body know are there some way to check what happened on my application? Thanks, any opinion will be appreciated ! Eric
Asked
by Eric Peng.
Last updated
.
Post not yet marked as solved
278 Views

M1 Chip Mac app - MS Office files not opening in WKWebview

We are not able to load any .xlsx, .pptx file in WKWebview with M1 Chip Mac app but we can load PDF files. The app is designed for iPad. We can able to load the same files in iOS and iPadOS. We are getting "Frame Load Interrupted" error in Mac app.
Asked Last updated
.
Post not yet marked as solved
97 Views

Is there a planned end of life for Rosetta 2?

I found some articles on MacOS 11.3, that are several months old, that intimated that Rosetta 2 will be discontinued in future releases. Is there any official timeline for the deprecation of Rosetta 2 for ARM based Macs? Thanks.
Asked
by crbdev.
Last updated
.
Post not yet marked as solved
87 Views

What can be done to execute Intel-based Mac executables on an M1 Mac running Big Sur 11.6?

Rosetta and Rosetta 2 do not appear to be available.  All attempts to execute the Intel code failed with the "zsh: bad CPU type in executable" message.  Since I wasn't prompted to install Rosetta or Rosetta 2, I executed the following, % softwareupdate --install-rosetta which responded with I have read and agree to the terms of the software license agreement. A list of Apple SLAs may be found here: http://www.apple.com/legal/sla/ Type A and press return to agree: So, I typed the A and the return.  The result was 2021-10-03 04:31:49.497 softwareupdate[1775:240889] Package Authoring Error: 071-97390: Package reference com.apple.pkg.RosettaUpdateAuto is missing install KBytes attribute Install of Rosetta 2 finished successfully Although the message ended with "finished successfully", note the error disclosed. Furthermore, the behavior of my M1 Mac running Big Sur 11.6 did not change, i.e. my Intel-based Mac executables still failed to execute. So, what can be done?
Asked Last updated
.
Post not yet marked as solved
534 Views

XPC so universal app can interact with ARM or Intel dylib?

Hello - TLDR - Is there any sample code to demonstrate how one goes about creating dedicated XPCServices to wrap ARM and Intel-specific dylibs? We have an app we're looking at moving to a universal binary. In that same app we have a framework that currently wraps R functionality by directly linking to /Library/Frameworks/R.framework/Current . R now has dedicated Intel and ARM builds (https://mac.r-project.org/) After watching the 2020 WWDC session "Port your Mac app to Apple silicon" (https://developer.apple.com/videos/play/wwdc2020/10214/?time=2006), it sounds like, for us to deploy a universal binary I should look at wrapping the R interaction bits into dedicated ARM and Intel XPC services so the appropriate architecture for R will run. Is anyone aware of any sample code or extended documentation demonstrating the ins and outs of how to think about this? Thank you
Asked
by ewhitley.
Last updated
.
Post not yet marked as solved
115 Views

xcodebuild -create-xcframework generate errors

Hello, We try to build an universal framework (especially for Silicon) but when we try to launch 'xcodebuild -create-xcframework ...' we got an error : "unable to create a Mach-O from the binary" We managed to create 2 archives (device and simulator) with thie command 'xcodebuild archive...' but then we got the error above when trying to generate xcframework. Our framework use VLCMobileKit so may be the error comes from that but we are pretty lost now :) , and xcodebuild command doesn't show furhter infos about the error. Thanks in advance
Asked
by arilanto.
Last updated
.
Post not yet marked as solved
1.1k Views

Rosetta error when trying to use a x86_64-only library via XPC

I'm trying to get my macOS app running natively on the Apple Silicon DTK and it's going fine so far. Unfortunately it makes use of a third party library which isn't (and probably won't ever be) available in form of a Universal Binary. This should be no problem, though, because I've been using that library via XPC before and the documentation clearly states that mixed architectures are supported as long as they are out-of-process. So I went ahead and configured Xcode's build settings as follows for the x86-only XPC target: ARCHS: x86_64 VALID_ARCHS: x86_64 The main app and also the XPC compile fine. But when running the app it fails to launch the XPC with the following error in the console: oah error: /var/db/oah/e089a6709d38c1a085254c76a7cb592fcceddb3f234a4aa318bb4ec25fe40d27/a37f39d2b061393d7731233ae89d90cd87c97f4edeeb46a78ad791/ c43ac96d2b/my.xpcBundleID.aot: unable to mmap __TEXT: 1 Does anyone know what's going on here?
Asked
by fedo.
Last updated
.
Post not yet marked as solved
2.2k Views

Apple Silicon Kit .ipa installation is not working

I have the Silicon Kit Mac mini and I am trying to run the IPA file for my iOS app on the Mac. I added the Mac to the provisioning profile and built the app on another computer. When I try to open the generated .ipa file on the silicon Mac I get the following error: Unable to install "[my app's name]" This app cannot be installed because its integrity could not be verified. I am using macOS Big Sur Version 11 Beta with the Apple A12Z chip.
Asked
by samjohn.
Last updated
.
Post marked as solved
4.4k Views

Both ios-arm64-simulator and ios-x86_64-simulator represent two equivalent library definitions

Seeing these when trying to create an xcframework for Apple Silicon that supports Mac Catalyst and the iOS Simulator: Both ios-arm64-simulator and ios-x86_64-simulator represent two equivalent library definitions. Both ios-arm64-maccatalyst and ios-x86_64-maccatalyst represent two equivalent library definitions. Here's the command: xcodebuild -create-xcframework \ 		-framework ./xcframework-build/catalyst-x86_64/opencv2.framework \ 		-framework ./xcframework-build/catalyst-arm64/opencv2.framework \ 		-framework ./xcframework-build/osx-x86_64/opencv2.framework \ 		-framework ./xcframework-build/osx-arm64/opencv2.framework \ 		-framework ./xcframework-build/iphonesimulator-arm64/opencv2.framework \ 		-framework ./xcframework-build/iphonesimulator-x86_64/opencv2.framework \ 		-framework ./xcframework-build/iphoneos-arm64/opencv2.framework \ 		-output ./xcframework-build/opencv2.xcframework From my understanding fat binaries for these frameworks isn't valid, but maybe it is in this case? These are static frameworks if that matters at all. Using Xcode 12.2 RC.
Asked Last updated
.
Post not yet marked as solved
538 Views

Command PhaseScriptExecution failed with a nonzero exit code

Since a few days I can't compile my flutter project anymore. I tried several solutions found on the internet but none of them worked for me. I am using a MacBook Pro M1 with XCODE version 12.5.1 (12E507). You can find the output of the error I'm experiencing in the attached copy. Thank you for any useful help that can save me from this situation. Error message: 👇🏾  /bin/sh -c /Users/donarias/Library/Developer/Xcode/DerivedData/Runner-fdbfjdxtqbyzbqgfhspjraxpjmdc/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-9740EEB61CF901F6004384FC.sh ../../../../../.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:311:32: Warning: Operand of null-aware operation '??' has type 'Color' which excludes null.  - 'Color' is from 'dart:ui'.                   color: theme.backgroundColor ?? Colors.white,                                ^ ../../../../../.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:297:15: Error: No named parameter with the name 'scrollBehavior'.               scrollBehavior: scrollBehavior,               ^^^^^^^^^^^^^^ ../../../../flutter/packages/flutter/lib/src/material/app.dart:217:9: Context: Found this candidate, but the arguments don't match.   const MaterialApp.router({         ^^^^^^^^^^^^^^^^^^ ../../../../../.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:340:15: Error: No named parameter with the name 'scrollBehavior'.               scrollBehavior: scrollBehavior,               ^^^^^^^^^^^^^^ ../../../../flutter/packages/flutter/lib/src/material/app.dart:167:9: Context: Found this candidate, but the arguments don't match.   const MaterialApp({         ^^^^^^^^^^^ Command PhaseScriptExecution failed with a nonzero exit code
Asked
by DonArias.
Last updated
.
Post marked as solved
1.5k Views

Compiler directives in SwiftUI for platform-specific attributes

I'm building a universal application with SwiftUI that has an iOS app and Share Extension as well as a macOS app and Share Extension. There's a few places where I'm using SwiftUI attributes that are iOS-specific (example a NavigationView that has a StackNavigationViewStyle attribute) and need to provide an alternative when running on macOS. My question is: How do I ensure that these attributes that are only available for one platform don't cause build issues for the other platform? I've tried using the #if os(iOS) compiler directive, but then I get a build error saying "Unexpected platform condition (expected 'os' 'arch' or 'swift')" when doing something like this: 				NavigationView { 						... 				}         #if os(iOS)			 				.navigationViewStyle(StackNavigationViewStyle())         #endif
Asked
by corybohon.
Last updated
.
Post marked as solved
447 Views

optional (weak-link) framework in UB app with only intel arch present?

I'm working getting a large app to Universal Binary, which uses a number of libraries and frameworks with third-party dependencies, a few of which are not yet available as arm64. If a framework is marked as Optional in the app's build settings, the app will still link when it is absent. I expected that if the framework only had one architecture needed for UB (e.g. just x86_64), we should be able to optionally link it successfully, and it would not matter if one architecture was missing. However this isn't how Xcode handles it, we get a linker error for the missing architecture even if the framework is optional. Is there a way to do what I'm expecting? Include an optional framework with only one architecture in a UB app, with the app taking responsibility for correct handling of the framework at runtime (just as it would for a missing optional framework in a single-architecture app)?
Asked
by ccorbell.
Last updated
.
Post marked as solved
765 Views

Notarization of universal static library (fat file) doesn't work

I am trying to notarize a framework built for both platforms, arm64 and x8664 (universal). The framework contains a static library (fat file) which can't be notarized. I get the following errors in the log: "The binary is not signed." and "The signature does not include a secure timestamp." When I build only for one of the two architectures (non-fat file), the notarization works without any issues. Universal: % file libtbarcode11.a  libtbarcode11.a: Mach-O universal binary with 2 architectures: [x8664:current ar archive] [arm64] libtbarcode11.a (for architecture x8664): current ar archive libtbarcode11.a (for architecture arm64): current ar archive % lipo -info libtbarcode11.a Architectures in the fat file: libtbarcode11.a are: x8664 arm64   % codesign -v --verify libtbarcode11.a libtbarcode11.a: valid on disk libtbarcode11.a: satisfies its Designated Requirement arm64: % file libtbarcode11.a libtbarcode11.a: current ar archive % lipo -info libtbarcode11.a Non-fat file: libtbarcode11.a is architecture: arm64 % codesign -v --verify libtbarcode11.a libtbarcode11.a: valid on disk libtbarcode11.a: satisfies its Designated Requirement codesign commands I tried so far: codesign --force --verify --verbose --sign "MyDeveloperIDApplicationCert" libtbarcode11.a codesign --force --verify --verbose --sign "MyDeveloperIDApplicationCert" --options runtime libtbarcode11.a codesign --force --verify --verbose --sign "MyDeveloperIDApplicationCert" --deep libtbarcode11.a
Asked
by ndreisg.
Last updated
.
Post not yet marked as solved
217 Views

libexif universal library

Has anyone created a universal libexif.a that will work on both Intel and Apple silicon? Can someone please share a link.
Asked
by agarwaga1.
Last updated
.