ios iphone xcode renaming a built custom framework - xcode

Have a custom built framework using custom template, etc. Works great. But would like to copy the framework after the build something like.
/dir1/myframework.framework
to
/dir2/myframework-5.1.framework
When the renamed one is included in the xcode program, all is well (framework search path is correct, etc), but the link does not see the framework. Have tried to change the renamed info.plist items with no luck. What could be missing... I thought this was done before, but can't seem to get it working now. is this a signing thing from the framework build?
Changed the following plist items
bundle name myframework-5.1.framework
executable file (changed file name)
etc.

Turns out you have to rename the object link in the framework to the same name as the framework and all is ok.

Related

How to support Xcode Templates for SwiftPM?

I have Xcode Template that generate a bunch of files (not project) with some predefined repetitive code (for example classes for MVVM pattern). When I try to create these files in Xcode Project all works fine (I can find and create my templates in New File… menu), but when I try to do the same thing in SwiftPM I can't find my templates in the New File… menu.
All my templates are leaving in ~/Library/Developer/Xcode/Templates/**/*.xctemplate.
What should I do to show templates for SwiftPM as well?
After some research of /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/ folder I found that some default templates have the property SupportsSwiftPackage that set to YES. I added it to my templates and it finally works.

The type or namespace name 'DotNetNuke' could not be found

I built a custom theme for DNN several months ago using the Christoc templates for Visual Studio. I needed to make a small HTML adjustment today so I re-opened the solution and made the change but when I rebuilt the project, I get several build errors, presumably because it no longer recognizes my DNN dll:
The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?)
I checked my C:\path_to\dnndev.me\bin\DotNetNuke.dll and it's still there so I'm not sure why Visual Studio isn't seeing it.
When I built the skin originally, I was running DNN 9.1.1 but have since upgraded to 9.3.2. Could that be causing my issue?
I read elsewhere that I could be building on the incorrect version of .NET framework but I don't know what version to use for DNN 9.3.2 so I tried several different version with no change in results.
How can I solve this issue?
UPDATE:
Per the answer here, I rebuilt with .NET 4.7.2 and it did not solve my issue.
UPDATE 2:
Okay, so the small change I made was adding another layout page like the Home.ascx and Edit.ascx files that come with the template. If I remove the new layout files, the project builds fine.
What could I be doing wrong when adding a new layout?
What you read about the .Net framework version is correct. You need to 4.7.2.
The problem was a new layout I had created. I right clicked on the project and selected Add > New Item and chose Web Forms User Control. This was the wrong way to add a new layout.
I successfully added it by copy/pasting one of the template's pre-existing layouts and renaming it. The project builds fine now.
Ah, now I understand what went wrong. Adding a Web (Forms) User Control is not completely wrong, as a skin (or theme) is a kind of Web User Control, and has the same extension (.ascx).
What you have to do is deleting the code behind file (.ascx.vb or .ascx.cs), and change the first line of the ascx file to
<%# Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
(But copying another skin file is also a good solution as propably you have most of the references to the skin object already there)

Xcode 8.3: how to install multiple custom "Project Templates" in Xcode 8.3?

I am trying to install two custom "project templates" in Xcode 8.3.3.
To be more specific, I'm trying to install Cocos2D-obj templates for v2.1 and v2.2. (Cocos2D v3 or higher no longer use Xcode templates, but v2.x does.)
During the installation, each Cocos2D v2.1 and v2.2 creates its own Xcode template folders and those folders are simply copied into the Xcode's custom template folder:
~User/Library/Developer/Xcode/Templates/cocos2d v2.2
~User/Library/Developer/Xcode/Templates/cocos2d v2.1
I was hoping to see that there are two separated templates (cocos2d v2.2 and cocos2d v2.1) available in the template menu when a new Xcode project is being created. However only one (either v2.2 or v2.1) appears in the template menu. (Interesting thing is that the last modified one appears.)
Basically it seems like Xcode doesn't allow to have more than one custom template in its menu.
(However, "File template" menu shows both v2.2 and v2.1 "file template" correctly in Xcode, so only the project template doesn't.)
As far as I know this is something related to Xcode's custom template related behavior, but I cannot find any official document regarding custom template from Apple's document depository.
So the question is, how can I have two custom project templates (v2.1 & v2.2) appear in the template menu when new project is being created?
Any good answers or helpful comments are appreciated.
Thanks in advance.
Finally I have figured it out how it goes.
When it comes to "project template", Xcode looks like tracing the "identifier string" in the plist files of each templates. And when there are more than one template files exist under the same "identifier string", it chooses only one template randomly(?) among them and shows that in its template menu when an new project is being created.
After manually modifying those identifier strings from the templates (in v2.1) not to have same ones against templates in other package (v2.2), Xcode brings them all in its template menu correctly. So I manually modified all cocos2d-v2.1 templates not to have same identifier strings against v2.2. Also, it is worth to be noted that some templates have "ancestors" in its fields such that those ancestors are also needed to be updated accordingly when the entire template package is modified for this reason. I wish I could see any official documents from Apple regarding how to handle Xcode's templates, (for the latest version of Xcode).

Duplicated Xcode project issue

I've duplicated my Xcode project - basically I'm creating an app with similar functionality but with different content. I duplicated the main folder and updated the names in the new project for the new app following a guide on Youtube that was on another thread, but when I updated the background of the storyboard for the new app, I've now seen it has changed the storyboard of the original app, so it must be using the same story file, or be linked somehow.
Please can someone suggest what I might have done wrong, or what I need to do when duplicating the project to avoid the same story file being used.
Please check the "Full path" of your file like shown below. Make also sure, that all your other files are linked correctly.

Xcode file templates aren't created correctly

I'm having an issue with custom file templates in Xcode 4.
For example, with the cocos2d templates, when I try to make a new CCLayer file called GameLayer at my project root, it generates the files at .xctemplate/CCLayer/Gamelayer.h and .xctemplate/CCLayer/Gamelayer.m
The files seem to be correct but they're in the wrong place and they weren't added to the project.
I've tried this with the Cocos2d file templates as well as the Kiwi template from this post. Also any templates I try to create myself seem to have the same problem.
Turns out the issue was being caused by the fact that my ~/Libary/Developer/ was a symlink to a different drive to save space on my SSD. Whatever Xcode does when creating files from templates has problems with symlinks.

Resources