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

41 Posts
Sort by:
Post not yet marked as solved
0 Replies
7 Views
Hi I am trying to upload an App to the App Store. It is a Java application with a small Swift wrapper. I build for both arm64 and x86-64 and include JREs for both architectures inside the bundle. The Launcher App: @main struct LauncherApp {       static let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "drrename")       static func main() {           var jrePath: String = ""       #if arch(arm64)     if let jrePathArm64 = Bundle.main.path(forResource: "jre-18.0.1_10_arm64/Contents/Home/bin/java", ofType: ""){       jrePath = jrePathArm64     }       #elseif arch(x86_64)     if let jrePathX86 = Bundle.main.path(forResource: "jre-18.0.1_10_x64/Contents/Home/bin/java", ofType: ""){       jrePath = jrePathX86     }       #endif           if jrePath != "" {       logger.log("Got jre path: \(jrePath)")       if let jarPath = Bundle.main.path(forResource: "drrename-0.6.4-SNAPSHOT", ofType: "jar"){         logger.log("Got jar path: \(jarPath)")         let task = Process()         task.launchPath = jrePath         task.arguments = ["-jar", jarPath]         task.launch()         task.waitUntilExit()       } else {         logger.critical("Failed to get jar path")       }     } else {       logger.critical("Failed to get jre path")     }   } } I get the following error: I understand that both arm and x86 are required, that is why I package both x86-64 and arm64 JREs inside the bundle. How can I resolve this error? Many thanks!
Posted Last updated
.
Post not yet marked as solved
2 Replies
71 Views
Hello everyone, I have an application that I need to build in a way that at the end 2 .pkgs are coming out. One for M1 processors and one for Intel. Now I am thinking about distribution. Is there a way where one can create a universal installer that has the possibility to choose for itself between those versions (.pkgs) based on the host processor? Or any other way of distribution where the user does not take care which version they will download, but where one universal installer is provided that should decide for itself which of the 2 .pkgs will be installed?
Posted Last updated
.
Post not yet marked as solved
0 Replies
89 Views
If I purchase a MacBook Pro M1 Max, MacBook Air M1, MacBook Air M2, MacBook Pro M1 Pro...-any Apple Silicon MacBook, will OpenGL be supported? I'm currently developing an application with the following software versions and libs: JDK 17.0.2 IntelliJ Ultimate (this isn't very relevant though, but I got it for free from school) LWJGL 3.2.3 (includes OpenGL) JOML 1.9.23 I have not been able to run the application on my MacBook Air, which contains an Intel processor. It did not occur to me until hours of research that OpenGL (Java) has been deprecated since MacOS Mojave. However, I heard that it does work on Apple Silicon/ARM based computers. I don't see how this would work, since both Intel and Apple Silicon run computers still run MacOS where OpenGL is deprecated. Therefore, I would like to double check whether OpenGL (running the previous software specifications) would indeed be compatible with any of the Apple Silicon MacBooks listed above (despite OpenGL being deprecated). Alternatively, I have had to run Windows 10 on Boot Camp in order to test my games and run them abroad, which does not run at desirable speeds... If there are any alternatives that allow OpenGL support on my Intel processor based MacBook Air, please let me know. Otherwise, if anyone could point me towards a discount or deal I could strike for a Apple Silicon MacBook discount for High School students, it would be greatly appreciated (yes, I'm still in High School so I'm trying to do anything possible to avoid buying a new MacBook or at the very least not one at full price).
Posted
by L0raxeo.
Last updated
.
Post not yet marked as solved
2 Replies
454 Views
I am porting a macOS Objective-C app from just Intel silicon to universal binary -- Intel and Apple silicon both -- using Xcode 13.2.1, building on a 2019 Mac Pro running macOS 11.6.4. I have followed all the instructions here: https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary. In particular, in Xcode's "build" settings, "Architectures" is set to "Standard Architectures (Apple Silicon, Intel) - $(ARCHS_STANDARD)", and "Build Active Architecture Only" is set to "No". Yet when I use Xcode to build either the release or the debug version of my app, the shell command: lipo -archs <path to MyApp.app>/Contents/MacOS/<MyApp> returns only "x86_64", and indeed, the app doesn't even start initialization when I test it on a Mac Mini with Apple silicon. What could I be doing wrong?
Posted
by Knightley.
Last updated
.
Post not yet marked as solved
9 Replies
594 Views
Hello, I have an iOS application which has a "rate us" button. This button redirects to "Write review" section on the app's App Store. It is working great on both iPhone and iPad devices. The problem is on MacBook M1 - it is working, but once the App Store app for review is opened, my iOS app crashes :( UIApplication.shared.open(URL(string: "itms-apps://itunes.apple.com/us/app/app-name/id*****?action=write-review")!) Any ideas on how it can be fixed? Thanks!
Posted
by GeorgiD.
Last updated
.
Post not yet marked as solved
1 Replies
545 Views
I have download Xcode 12 for universal apps. I do not have VALID_ARCHS set at all and I can build FAT binary from Xcode IDE just fine. I have also installed CommandLine tools for Xcode 12, but when I try to build from the Terminal, I get just Intel binaries. Trying the -showdestinations option gives the following error: Ineligible destinations { platform:macOS, name:Any Mac }. If I try to set VALIDARCHS = arm64 to try build for ARM only, I get an error too. { platform:macOS, arch:x86_64h, error:My Mac doesn’t support any of targets’s architectures. You can set target’s Architectures build setting to Standard Architectures to support My Mac. } I have not found Command Line Tools for Xcode 12 Universal apps so maybe the Command Line Tools I have are for the standard Xcode 12 and can't build universal apps? Any ideas what might be wrong?
Posted
by RudoBaker.
Last updated
.
Post not yet marked as solved
0 Replies
121 Views
I have a SwiftUI app that uses a sidebar on iPad. I can not figure out why the edge spacing does not apply, however when I force close the app and reopen it appears normal. Problem: When user first signs in rotates device collapses sidebar and reopens) The problem goes away when force quitting the app and reloading when user is signed in. ContentView struct ContentView: View { var body: some View { #if os(iOS) if horizontalSizeClass == .compact { AppTabView() .environmentObject(store) .environmentObject(quickActionSettings) } else { AppSideNavView() .environmentObject(store) } #else AppSideNavView() .environmentObject(store) #endif } } AppSideNavView (For iPad) struct AppSideNavView: View { @EnvironmentObject var store: Store var body: some View { if store.userAuthState == .signedOut { LoginView() } else if store.userAuthState == .signedIn { AppSidebarNavigation() .environmentObject(store) } else { LoginView() } } } Sidebar struct AppSidebarNavigation: View { enum NavigationItem { case home case expenses } @EnvironmentObject var store: Store @State private var selection: NavigationItem? = .home var body: some View { NavigationView { sidebar .navigationTitle("") .navigationBarTitleDisplayMode(.inline) .navigationBarHidden(true) HomesView() .environmentObject(store) } .navigationViewStyle(DoubleColumnNavigationViewStyle()) } } extension AppSidebarNavigation { var sidebar: some View { List(selection: $selection) { Group { NavigationLink(destination: HomesView() .environmentObject(store), tag: NavigationItem.home, selection: $selection) { Label("Homes", systemImage: "house") .modifier(navText()) } .tag(NavigationItem.home) NavigationLink(destination: ExpensesView() .environmentObject(store) .navigationBarTitleDisplayMode(.large), tag: NavigationItem.expenses, selection: $selection) { Label("Expenses", systemImage: "arrow.right.arrow.left") .modifier(navText()) } .tag(NavigationItem.expenses) } } .listRowBackground(Color("White")) .background(Color("White")) .listStyle(.sidebar) } }
Posted
by RileyDev.
Last updated
.
Post not yet marked as solved
8 Replies
806 Views
Again, none of this is really my choice: our project is multi-platform (specifically, at this time, Windows and macOS). As a result, the people who started 8 hours before I did picked CMake and vcpkg to handle build system generation and 3rd party dependencies. (TBF, I can't blame them for this, since this does work on a Mac, for at least a simple build.) I want to support Apple Silicon, obviously. I can build native on my M1 MBP. (I could, theoretically, use lipo and create a universal bundle, but that would mean manually signing a handful of executables, and then the whole thing, unless I missed a way to do this much more easily?) We're using CircleCI for CI, or maybe github actions in the future. I have not been able to figure out how to use CMake and vcpkg to do a cross build. Not even universal, just "build for arm64 on Intel mac". googling and searching these fora hasn't shown a lot that seems to work (mainly, I think, for the vcpkg side). Which is weird, because one of the things people use CMake for is to build Android and iOS apps, which generally does mean cross-compiling. Does anyone know how to do that? I'm at the point where I'm looking at CocoaPods again -- but that will not work with CMake, so we'll have two completely different build systems, one of which requires a Mac with GUI to add/remove sources/targets.
Posted
by kithrup.
Last updated
.
Post not yet marked as solved
4 Replies
347 Views
Hi all, I'm developing a 3D modeling C++ application with embedded Python scripting capabilities which targets Big Sur. I want to distribute my application ("MyApp") with a full python package directly integrated into the MyApp bundle (the MyApp.app folder) so that users won't have to install Python manually. So I binded Python3.9 and my app using pybind11, and copied the Python framework folder (all files of the folder of the version 3.9, which is named "3.9") into the "Framework" directory of my App bundle, then locally set the PYTHONPATH and PYTHONHOME environment variables at run time so that they point to the python's Framework folder copied into the bundle. It's working: python scripts can run from my application even if there isn't python installed in the system. However, I have an issue when signing my MyApp bundle. Assuming that I need a python framework package which is universal, correctly signed and has folder structure and files compliant with Apple's bundle specs, I saw too options at first On one hand, homebrew provides signed python packages but for arm64 architecture only, so it must be excluded since I need x86_64 too. On the other hand, the official python website provides universal python packages but they are not signed. I then copied the Package from the official python website and removed many of its unessential components to make it tidy as much as possible, then ran a script that codesign all files that codesign signals as "not signed at all" when running it on the full RizomUV App bundle. Once all files that need to be signed have been signed, I got the following message when running codesign on the MyApp bundle folder: codesign --force --verify --verbose --sign "Developer ID Application: XXXXXXX (XXXXXX)" MyApp.app --option runtime MyApp.app: replacing existing signature MyApp.app: bundle format unrecognized, invalid, or unsuitable In subcomponent: /Users/me/Documents/a_path/MyApp.app/Contents/Frameworks/Python/lib/python3.9 That python3.9 folder, which contains a bunch of python script files (***.py) and some directories which seems to be not compliant with the bundle specifications. This prevents the signature of the full bundle and that's obviously a problem. I'm sure I'm not the only one who integrated Python as a framework into a universal bundle. I could do more investigations but I'm less and less confident that I'm following the right path as I find it overly complicated. There must be a better way right? Any help or feedback would be more welcomed. Best
Posted
by RemiArq.
Last updated
.
Post not yet marked as solved
2 Replies
306 Views
Hey So I was developing on... xcode 12, or 11? Not sure. I don't do much dev on apple lately, but in past I was able to run my c++ projects cross platform on windows/linux (cmake) and xcode. On latest xcode 13.3.1 something weird changed and I cant figure out how to un-change it. In general it's down to my imports. I have import like #include "someFolder/lalala/folder/file.h" but on mac now apparently I have to... #include "../someFolder/lalala/folder/file.h" instead Which is a little problematic given... 1500+ .h/cpp files etc... How/why/how can I go back to old way of "pathing" my files? I noticed that if I click on file &amp; look at Identity &amp; type I can sorta "change" the location of file, to relative to parent/group/etc. But none of them "fixes the issue". Can any1 suggest anything?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.7k Views
My app uses several 3rd party C++ libraries such as Google's Protobuf and many others. Most of them are dynamic libs (.dylib) and were built using standard .configure/make/make install from source. It is not clear to me how to build these in order to get universal libraries which run on Intel and Apple Silicon. Is there a flag in the standard build system that causes it to output a universal binary? Or can I build two libs (one for Intel and one for Apple Silicon) and combine them into a universal binary?
Posted Last updated
.
Post not yet marked as solved
0 Replies
165 Views
I currently have 3 different apps (one for iPhone, one for iPad and one for Mac, with different bundle ids) published in the App Store and I'm thinking of the possibility to merge them into one, and make that one Universal. At the moment I have 3 different Xcode targets with some code shared and some unique per platform. This allows me to keep iPhone-only code on the iPhone target, and iPad only code to the iPad, for example. My question is if I can keep this 3 different targets and create 3 different builds but somehow put them under the same app in AppStoreConnect (I don't know how to do that)? If the answer is no, I suppose I'd have to take the iPhone app, make it universal, and update my code to use the iPad's one instead. I currently use compiler conditionals like #if IS_IPAD_APP, I wonder if I could do a similar thing to avoid compiling iPhone code or assets into the iPad? For Mac I believe I can submit a different bundle? Thank you in advance!
Posted
by Aramusss.
Last updated
.
Post not yet marked as solved
2 Replies
293 Views
Hi, I'm maintaining two apps for internal need's. One of the app is generated as universal binary and executes as arm on the M1 chips . .perfect, but the second one is only executing in rosetta and I don't see why ! I have no dependency, only apple framework library, the only fancy libraries are some low-level network libs, but I have tried whiteout and no change. The build settings arch are "Standard architecture (Apple Silicon , intel) and everything other is on default. When I run the code my only choice is "My Mac (rosetta)" or any Mac intel. Any idea where I'm going wrong ? Regard's Claude
Posted
by cbrassel.
Last updated
.
Post marked as solved
1 Replies
333 Views
Hello guys! I faced a problem with building... My device suddenly updated to iOS 15.4.1, my Xcode was 13.2 and I had to update it to the latest version (13.3.1) to build the app. After the update, I had a few problems which were successfully solved but one of them stopped me for a few hours. The problem is with Bridging Headers or Swift Compiler, I really don't know what I did badly, and what causes problems. On several forums I often read that is important to set: Build Settings &gt; Build Options &gt; Build Libraries for Distribution But in any case it doesn't work, on yes: error: using bridging headers with module interfaces is unsupported on no: (line with import framework SWXMLHash) /Users/blablabla/SSLModel.swift:9:8: error: module compiled with Swift 5.5.1 cannot be imported by the Swift 5.6 compiler: /Users/blablabla2/Build/Products/Debug-iphoneos/SWXMLHash.framework/Modules/SWXMLHash.swiftmodule/arm64-apple-ios.swiftmodule import SWXMLHash It will be important that I use Carthage. What should I do? Clone all 10 frameworks that I use and re-build them with a new Xcode which includes compiler 5.6? That may be a bad solution... Any answers on similar topics don't help..
Posted Last updated
.
Post not yet marked as solved
3 Replies
263 Views
I have an application made for iPhone and iPad with enabled capability to run natively on M1 Macs. When I try to resign it with an AdHoc profile: codesign --force --deep -s - MyApp.app Application can not be launched anymore with error: "MyApp.app" cannot be opened because the developer did not intend for it to run on this Mac. Contact the developer for support. Is there way to resign it without loosing an ability to run on M1 Mac? Thanks!
Posted
by ToyoApps.
Last updated
.
Post not yet marked as solved
0 Replies
535 Views
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
Posted
by arilanto.
Last updated
.
Post not yet marked as solved
1 Replies
790 Views
Hello, So I have been coding in React Native. I decided download the app to my phone. So after some configuration I had the IOS code and decided to open it in the XCode and use it on my iPhone to make sure there is no error or bugs. When I open up my project in Xcode I get an error saying Executable not found and it give me a path like this. /Users/{user}/Library/Developer/Xcode/DerivedData/instagramclone-dryvgcjhtprxzfaqclglbqtiuwvr/Build/Products/Debug-iphonesimulator/instagram.app So I check the path and instagram.app is there. So the file exists however, the app has this cross logo on it and when I double click it gives me an error saying "You can't open the application "instagram" because it may be damaged or incomplete. This is how the file looks like. I don't get it why it says's that. Just letting everyone know I am coding in Apple M1 because I know sometimes some things may not be supported in every chip or setup is different so I am using M1 (Apple Mac Mini) Thank you
Posted Last updated
.
Post marked as solved
12 Replies
12k Views
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 \ &#9;&#9;-framework ./xcframework-build/catalyst-x86_64/opencv2.framework \ &#9;&#9;-framework ./xcframework-build/catalyst-arm64/opencv2.framework \ &#9;&#9;-framework ./xcframework-build/osx-x86_64/opencv2.framework \ &#9;&#9;-framework ./xcframework-build/osx-arm64/opencv2.framework \ &#9;&#9;-framework ./xcframework-build/iphonesimulator-arm64/opencv2.framework \ &#9;&#9;-framework ./xcframework-build/iphonesimulator-x86_64/opencv2.framework \ &#9;&#9;-framework ./xcframework-build/iphoneos-arm64/opencv2.framework \ &#9;&#9;-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.
Posted Last updated
.
Post not yet marked as solved
1 Replies
257 Views
Hi, So my app (which is a mix of C++ and Objective-C) is still not a universal build since it has a lot of C++ dependencies that need to be recompiled first. I'm using a NSTask to launch other processes from my app. Unfortunately the subprocess (even when the binary is universal) is launched via Rosetta and not natively (so the same as my app). What's the best solution to control the architecture of a spawned subprocess? Thanks.
Posted Last updated
.