script to build apple embed data