2sxc - copy app to new folder and name - 2sxc

I created my "base" app which I plan to use for a different little-changed app with different views and additional fields.
What is the right and easiest way to make a copy of this base app to different name and folder?
Also can than that apps work side by side on one portal?
=== edit 1 ===
I already try to rename app like in this post: 2sxc : Rename App Folder
Then create a new export of entire app, and restore portal to version before rename and try to import this "new" renamed app. But get the error...
Now I am looking to exported App.xml and there are "EntityGUID" and "AttributeSet StaticName" and "App Guid" with GUID values and I think that this is a problem at importing this "new" app...
Is it possible that I make a tool to parse this XML find all GUID-s then generated the same number of new GUID-s and replace old ones with new ones and repack ZIP and then try to import this? Can this be a solution or this is totally wrong?

I make an app : https://github.com/pircjernej/NajdiNET.2sxc.Rename
If you build it or download exe from the release you can change Exported app ZIP file to new name and folder... Then just install this changed zip and do what you want...
Now work for my sample 2sxc app but did not test how to work with 2sxc sample apps... I will do this in next days...
If someone wants to test it help or contribute, you are welcome.
==== edit 1 =====
I make quick test with 2sxc blog app and I think that work OK

Related

"Unable to look up library. Check the ID and access permissions and try again." Firebase Google Apps Script

I am unable to find the Firebase library for Google Apps Script.
I followed the following instruction:
https://sites.google.com/site/scriptsexamples/new-connectors-to-google-services/firebase
The in this article mentioned project key / script id can not be found when trying to add the library in my new project.
The Look Up renders:
Unable to look up library. Check the ID and access permissions and try again.
Am I missing something? Am I doing something wrong?
Use the Script ID
as opposed to the Project Key
For this library it's:
1hguuh4Zx72XVC1Zldm_vTtcUUKUA6iBUOoGnJUWLfqDWx5WlOJHqYkrt
New editor vs Legacy
With the move to the new editor, using Project Keys no longer work.
See the different instructions for the New vs Legacy Editor in the docs:
https://developers.google.com/apps-script/guides/libraries
Adding a library if you only have the Project Key
If you can't find the ID for a particular script, while the Legacy editor is still available you can switch to the Legacy editor to add it with a Project Key, and then switch back to the new editor.
Finding the Script ID if you only have the Project Key
Maybe you want to get the ID for later reference. To get this, once you have it added, you can press the "three dots" button next to the library name and select "Open in new tab". Once you have it open, you can get the ID from the URL.
I came here because I tried to use a deployment id for a script library.
The fix was to use the project id which I found under project settings.
The answer from 'iansedano' is correct. I just want to add that a to get the 'script id' it's easier to just go to the settings and copy it from there:

Why can't I publish the project?

So I'm trying to publish a project to a local folder, which normally works. But as soon as I get contents from another site to implement the new update into it, it fails. There are no errors what so ever, and in the suggested tmp-file, it says to check the output window. I am using Umbraco Version 7.15.5.
Thank you for your help in advance!
The error:
The tmp-file:
The output-window:
The Error List:
Publish-Window:
Please make Delete existing file as False. Delete the files manually and check.

2sxc | Duplicate an existing App

I want to duplicate an existing app but run into errors when doing so. I am able to rename an app just fine (both in file structure and app configuration screen) but after renaming and importing same app again it throws error.
I have tried importing FAQ app, renaming it (successfully), exporting this renamed app, then re importing FAQ app again, and trying to import my custom exported app into the new FAQ app but due to existing uploaded content it fails?
What is the best practice to duplicate an existing app? Thx
This is a rare scenario and there's a feature request to do this, but ATM you'll have to do it manually. These are the "pain points":
folder where the app is
app GUID
Since this is a rare scenario, I would
quickly import the app into another portal
change the app-folder in the DNN file management
change the app-folder in the app-settings
export the app again - and make sure you check the box "reset GUID" as it will set the GUID to 00000-0000-... which will make the import generate a new guid for you
Hope this helps.

create folder in file system storage is not working in code name one

In CodeNameOne, I am using the following code to create a new folder but it's not working. I am testing in android simulator and mobile.
FileSystemStorage storage = FileSystemStorage.getInstance();
storage.mkdir("tizbn");
Codename One's FileSystemStorage requires absolute paths to all files, you need to either construct a path from the roots or from the app home method. Your statement assumes a current working directory which is problematic on a phone.

The workspace with the iOS project and related a static library project

I am fighting with Xcode 4 workspaces. Currently Xcode 4 wins. Thus, my situation:
I have the workspace with the iOS app project. There is also static library project iOS app depends on in the this workspace.
Solution #1
I try to configure like this:
the app project:
add to target's Build Phases > Link Binary With Library a product (libmystaticlib.a);
set USER_HEADER_SEARCH_PATHS to $(TARGET_BUILD_DIR)/usr/local/include $(DSTROOT)/usr/local/include;
the static library project:
add some header files to target's Build Phases > Copy Headers > Public;
set SKIP_INSTALL to YES.
And important thing: both projects must have configurations named the same. Otherwise, if I have, e.g., configuration named Distribution (Ad Hoc) for the app and Release for the static library, Xcode can't link the app with the library.
With this configuration archiving results to an archive with the application and public headers from static library projects. Of course, I am not able to share *.ipa in this case. :(
Solution #2
I have also tried another configuration:
Xcode preferences:
set source tree for the static library, e.g, ADDITIONS_PROJECT;
the app project:
add to target's Build Phases > Link Binary With Library a product (libmystaticlib.a);
set USER_HEADER_SEARCH_PATHS to $(ADDITIONS_PROJECT)/**;
the static library project:
don't add any header files to Public!;
set SKIP_INSTALL to YES.
I still need to care about configuration names for both projects. But in result I can build and archive successfully. In the result I get archive and I can share *.ipa.
I don't like the second solutions, because in this case I don't get any real advantage of the Xcode 4 workspace. The same effect I can add get, if I add the static lib project inside the app project. Therefore, I think something is wrong with my solution.
Any suggestion how better to link a static libraries?
I also found a solution that works with build and with archive.
In your static library set the Public Headers Folder Path to ../../Headers/YourLib
In your app config set the Header Search Paths to $(BUILT_PRODUCTS_DIR)/../../Headers
In your app you will be able to code #import <YourLib/YourFile.h>
Don't forget the Skip Install = YES option in your static lib.
We've found an answer, finally. Well, kind of. The problem occurred because Xcode 4 places public headers into InstallationBuildProductsLocation folder during build for archive. Apparently, when archiving it sees the headers and tries to put them into archive as well. Changing Public Headers Folder Path of the lib to somewhere outside of InstallationBuildProductsLocation, for example, to $(DSTROOT)/../public_folders and adding this path to Header Search Path solve the problem.
This solution doesn't look very elegant, but for us it seems to be the only option. May be you'll find this useful.
Here is a solution a get from Apple DTS. I don't like it, because it is suggests to use absolute path. But I still publish it here, maybe someone feels it is right for him.
How to set up the static library:
Add a build configuration named "Archive" by copying the Release Configuration.
Move your headers to the Project group of the Copy Headers build phase.
Set the Per-configuration Build Products Path of the "Archive" configuration to $(BUILD_DIR)/MyLibBuildDir. Xcode will create the MyLibBuildDir folder inside the BuildProductsPath, then add your static library into that folder. You can use "MyLibBuildDir" or provide another name for the above folder.
Set Skip Install to YES for all configurations.
Set Installation Directory of "Archive" to $(TARGET_TEMP_DIR)/UninstalledProducts.
Edit its scheme, set the Build Configuration of its Archive action to "Archive."
How to set up the project linking against the library:
Add a build configuration named "Archive" by copying the Release Configuration.
Set the Library Search Paths of "Archive" to $(BUILD_DIR)/MyLibBuildDir.
Set the User Header Search Paths to the recursive absolute path of your root of your workspace directory for all configurations.
Set Always Search User Paths of "Archive" to YES.
Set Skip_Install to NO for all configurations.
Edit its scheme, set the Build Configuration of its Archive action to "Archive."
I was not real happy with any of the other solutions that were provided, so I found another solution that I prefer. Rather than having to use relevant paths to put the /usr/local/include folder outside of the installation directory, I added a pre-action to the Archive step in my scheme. In the pre-action I provided a script that removed the usr directory prior to archiving.
rm -r "$OBJROOT/ArchiveIntermediates/MyAppName/InstallationBuildProductsLocation/usr"
This removes the usr directory before archiving so that it does not end up in the bundle and cause Xcode to think it has multiple modules.
so far I also struggled with the same problem, but did come to a solution with a minimal tradeoff:
This requires Dervied Data to be your Build Location.
I set the Public Headers Folder path to ../usr/local/include
This will ensure, that the headers will not be placed into the archive.
For the app, I set the Header Search Path to:
$(OBJROOT)/usr/local/include
$(SYMROOT)/usr/local/include
There are 2 entries necessary since the paths slightly change when building an archive and I haven't figured out how to describe it with only one variable.
The nice thing here is, that it doesn't break code sense. So except for having 2 entries rather than one, this works perfectly fine.
I'm struggling with the same problem at the moment. I didn't progress much farther than you. I can only add that in the second solution you can drag headers you need to use from the library to the app project, instead of setting ADDITIONS_PROJECT and USER_HEADER_SEARCH_PATH. This will make them visible in app project. Value of SKIP_INSTALL flag doesn't matter in this case.
Still, this solution isn't going to work for me, because I'm moving rather big project, with dozens of libraries, from Xcode 3 to Xcode 4, and it means really a lot of drag and drop to make my project build and archive correctly. Please let us know if you find any better way out of this situation.
I could use Core Plot as a static library and workspace sibling, with two build configurations:
Release:
in project, Header Search Path: "$(BUILT_PRODUCTS_DIR)"
in CorePlot-CocoaTouch, Public Headers Folder Path: /usr/local/include
AdHoc (build configuration for "Archive" step in Scheme, produces a shareable .ipa):
in project, Header Search Path: "$(BUILT_PRODUCTS_DIR)"/../../public_folders/**
in CorePlot-CocoaTouch, Public Headers Folder Path: ../../public_folders
Hope it will help someone to not waste a day on this.

Resources