PacketTunnelProvider does not trigger the startTunnelWithOptions function - networkextension

I downloaded an app about PacketTunnelProvider from github, and changed the bundleid of the app. The program can run and the function is easy to use.
But when I deleted the target of the PacketTunnel and tried to create a new target of the PacketTunnel myself, I found that the code was not executed, and the bundleid ID was still used, which was applied from the developer center.
I use xcode 13.2.1. I want to ask you to tell me why the new target is difficult to use, but the original one is. I guarantee that the bundleid is available.
I've tried many times, but I can't realize it. What configurations are missing

Related

Updated MATLAB app installs as a new unique app

Some time ago, we distributed a toolbox to our users via the MATLAB App Packager, to make it easier to provide future updates, without users having to handle search paths. Now, we wish to distribute an updated version. Usually, re-packaging the toolbox should make a new .mlappinstall file, which asks the user to upgrade. Instead, MATLAB now considers the new version of the app as a unique new app, and installs it again rather than upgrading. Thus, the user will then have the app twice in the Apps pane, one in an outdated version, and one in the new version.
We have been unable to find an explanation for this in the MATLAB documentation nor online. When we install the updated app (so that both versions are present in the Apps pane), further changing it will upgrade it as expected, so unfortunately, we cannot provide a minimal working example, as we cannot reproduce the issue.
The question is this: How does MATLAB establish app uniqueness? The app name and author fields are identical to the original values, and the version number is incremented, so why might MATLAB not recognize that the app is already installed?
When you had that discontinuity, were you re-packaging using the original .prj file by clicking on it in the file browser in Matlab, or did you run "Package App" again and fill in the same properties?
I think the thing that determines the unique identity of the app is a GUID that is generated behind the scenes by the "Package App" wizard. If you open an existing .prj in the Matlab GUI, it re-uses that GUID. If you run "Package App" again you'll get a fresh GUID regardless of what you put in for the various developer-visible app properties.
You can dig around in the .prj and .mlappinstall files to see this yourself. (I couldn't find it documented anywhere either; I just poked around the files and did some trial and error.) The .prj is just XML, and the .mlappinstall file is a zip file with an "Open Packaging Convention" layout. In the .prj, there's a param.guid element containing the GUID. In the .mlappinstall, its in metadata/appProperties.xml in a GUID element.
If you end up with the same problem again, make sure to re-package using the existing .prj file. Or if you don't have it, once you create your new .prj file, dig the old GUID out of the metadata/appProperties.xml from the old .mlappinstall file and copy it in to your new .prj file and I think it'll behave as the "same" app. This will even let you change the name and contact info for your app, and it'll still install on top of older versions.

xcode name change causing iphone simulator to crash [duplicate]

This question already has an answer here:
Build and run Fails after changing Xcode project name
(1 answer)
Closed 9 years ago.
Today I changed my Xcode project and now when I build and run the app it crashes when clicking anything in the app. If anyone could please help out I would really appreciate it, I spent so much time working on this project and had just finished it. I decided to change the name last minute and now I got myself in a pickle.
Thanks for all the help everyone but i guess I'm going to try and re work a new project all over again. :(
You need to reset the Simulator and do a Product - Clean in Xcode.
Renaming the project changes your bundle identifier. It's often recommend as a best practice to not use the default bundle identifier but to just explicitly set it com.apple.mail
After further investigation it looks like the rename is not the issue. You need to set and exception breakpoint to see what is going on.
Now run it with the debugger attached and make it crash.
Answer just for ASL
See the exception being thrown:
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: ' -[NSURL initFileURLWithPath:]: nil string parameter'
Set a breakpoint at your initFileURLWithPath method and look at it in the Xcode debugger. I bet you'll catch the path being something you weren't expecting it to be.
Original Answer:
As you've discovered, changing the name of your project can indeed be really tricky and if you don't change it properly, catastrophic things can happen.
Do you have a Time Machine backup of your project? If so, you can easily get back to last night's version of your project before you attempted to do the name change.
Then, changing the name of your app can be as simple as changing the "Bundle display name" in the info.plist file:
This is the lightweight, easy way to do it.
And yes, it doesn't change the underlying project name, but it does change the display name and for your customers, that's all that really matters.
2)
Now, to change the underlying project name, you need to have some time and patience.
I start by typing in the new name for the Xcodeproject file, like this:
Which brings up this sheet:
Then look at your target settings to make sure the old name doesn't exist anymore:
And after all that's done, you might want to change the name of your scheme (via the Xcode scheme editor), since the old name is probably still there as well.

Xcode 4 - created new target, got problems with duplicate interface declarations

I'm new to Xcode, and I'm working on my first project in this environment. I have come across a real head scratcher.
My project is soon ready to be launched. So I wanted to change the product name from a silly work name to the actual name of the soon to be launched product. So I created a new Target with the real name.
When I try to compile the new target I get like 90 errors telling me that I have duplicate interface declaration. All errors occurs in cocos2d framework header files, that I use for my game.
Obviously I missed out on something creating the new target.
My first thought was that there was some kind of conflict with the old target, so I deleted it. Which wasn't the smartest thing since I now can't compare the build settings between the two targets to see what went wrong.
Is there anyone out there who can enlighten a poor sod like myself on whats wrong?
Thank you!
I think what you want is to change how the app is named in the App store and on devices. You configure the app name in iTunes Conect, and to configure how the target appears on a device, go to Target > Info > Bundle Display name and change that to what you want to appear on a device. Build and deploy, and you should see your results in the simulator.

Overwriting an iPhone app from a different Xcode Project

One of the apps I've developed is submitted and approved to the appstore.
Because of some big changes and a more generic code I created a new XCode project for this app.
The problem is when trying to install the same app (based on bundle identifier) from the new XCode project, it quits with a crash. If I try to install again (Build & Run/Debug) from XCode, it seems to successfully overwrite and run. So it seems the first time there are some merge / overwrite conflicts. A second install, over the failed first attempt makes it work.
I wouldn't want this to happen with app updates downloaded from the store.
I've read that the idea is not to build from XCode, but use an Ad Hoc Build through iTunes instead. This would simulate a more natural end-user process. I've tried this, but somehow it won't sync / overwrite the existing app from the appstore (no errors, the app is just not changing).
Does someone have a hint on how to solve this?
Any help on this matter would be greatly appreciated!
I run into this problem all the time. I use one Developer Profile for all my dev work (and thus, one bundle identifier).
You have to delete the old App from the phone, and do a Clean Build.
These are similar problems. (1) (2)
As it seems working with an Ad Hoc build through iTunes does work.
Yesterday I double-clicked, but never got the iTunes message warning me of an older version existing in my apps and whether I want to replace it.
Dragging the .IPA into the iTunes app section did give me this message. Telling it to replace and next syncing works okay. iTunes sync status bar displays the message "YourAppName Updating". Afterwards launching it works fine with stored data intact.
The flow described here worked for me:
How to test an iPhone application update

Some generic and working Xcode project settings which lead to successful Mac App store submission?

I built a simple app that I'd like to submit to the Apple store, but I am not sure whether my project Release settings are set correctly. I adjust a few things, based on what I could find online, but I might've created more problems than I solved.
I would very much appreciate if somebody could provide a copy of working Release settings which would sure work for my project. I don't store/read any files, the application just runs a few commands. Basically, I just need it to run and install in that /Applications folder so the user could trigger a launch.
Basically use default settings, move your source code to a new project, read up the guidelines and see if anything is told to change, otherwise it's just fine. Cheers.

Resources